diff options
| author | Kim F. Storm | 2004-11-23 15:23:57 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-11-23 15:23:57 +0000 |
| commit | d9f043554d8e441cf3eff5e14d25c0111792a93e (patch) | |
| tree | c4d116e2079b67ad010a17ba3b2d1906d865c415 | |
| parent | 92c8c0ce0b4910b3c77613b1e6a7120b93566d40 (diff) | |
| download | emacs-d9f043554d8e441cf3eff5e14d25c0111792a93e.tar.gz emacs-d9f043554d8e441cf3eff5e14d25c0111792a93e.zip | |
(substitute-key-definition-key): Optimize. Don't
call indirect-function for nil defn (always signals error).
| -rw-r--r-- | lisp/subr.el | 3 |
1 files changed, 2 insertions, 1 deletions
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: | |||
| 422 | (nconc (nreverse skipped) newdef))) | 422 | (nconc (nreverse skipped) newdef))) |
| 423 | ;; Look past a symbol that names a keymap. | 423 | ;; Look past a symbol that names a keymap. |
| 424 | (setq inner-def | 424 | (setq inner-def |
| 425 | (condition-case nil (indirect-function defn) (error defn))) | 425 | (and defn |
| 426 | (condition-case nil (indirect-function defn) (error defn)))) | ||
| 426 | ;; For nested keymaps, we use `inner-def' rather than `defn' so as to | 427 | ;; For nested keymaps, we use `inner-def' rather than `defn' so as to |
| 427 | ;; avoid autoloading a keymap. This is mostly done to preserve the | 428 | ;; avoid autoloading a keymap. This is mostly done to preserve the |
| 428 | ;; original non-autoloading behavior of pre-map-keymap times. | 429 | ;; original non-autoloading behavior of pre-map-keymap times. |