# HG changeset patch # User Kim F. Storm # Date 1101223437 0 # Node ID fbd266022300929d2e89f02718c00a17b4a1e008 # Parent d9e5fd89f5cfc2664dedcbe2aa031ff2116a3089 (substitute-key-definition-key): Optimize. Don't call indirect-function for nil defn (always signals error). diff -r d9e5fd89f5cf -r fbd266022300 lisp/subr.el --- a/lisp/subr.el Tue Nov 23 15:23:35 2004 +0000 +++ b/lisp/subr.el Tue Nov 23 15:23:57 2004 +0000 @@ -422,7 +422,8 @@ (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.