diff --git a/lisp/subr.el b/lisp/subr.el index 4a0db9633bd..5abecd35310 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -607,8 +607,7 @@ For most uses, it is simpler and safer to use command remappping like this: (nconc (nreverse skipped) newdef))) ;; Look past a symbol that names a keymap. (setq inner-def - (and defn - (condition-case nil (indirect-function defn) (error defn)))) + (or (indirect-function defn t) defn)) ;; For nested keymaps, we use `inner-def' rather than `defn' so as to ;; avoid autoloading a keymap. This is mostly done to preserve the ;; original non-autoloading behavior of pre-map-keymap times.