]> git.eshelyaron.com Git - emacs.git/commitdiff
(substitute-key-definition-key): Optimize. Don't
authorKim F. Storm <storm@cua.dk>
Tue, 23 Nov 2004 15:23:57 +0000 (15:23 +0000)
committerKim F. Storm <storm@cua.dk>
Tue, 23 Nov 2004 15:23:57 +0000 (15:23 +0000)
call indirect-function for nil defn (always signals error).

lisp/subr.el

index b40c64c63eb506432a36f9cabe5005059726df4c..6d8ebeec22b8f550a3028e01ec3a8a5937a96a5d 100644 (file)
@@ -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.