From: Kim F. Storm Date: Tue, 23 Nov 2004 15:23:57 +0000 (+0000) Subject: (substitute-key-definition-key): Optimize. Don't X-Git-Tag: ttn-vms-21-2-B4~3718 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d9f043554d8e441cf3eff5e14d25c0111792a93e;p=emacs.git (substitute-key-definition-key): Optimize. Don't call indirect-function for nil defn (always signals error). --- diff --git a/lisp/subr.el b/lisp/subr.el index b40c64c63eb..6d8ebeec22b 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -422,7 +422,8 @@ 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 - (condition-case nil (indirect-function defn) (error defn))) + (and defn + (condition-case nil (indirect-function defn) (error 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.