comparison lisp/subr.el @ 58460:fbd266022300

(substitute-key-definition-key): Optimize. Don't call indirect-function for nil defn (always signals error).
author Kim F. Storm <storm@cua.dk>
date Tue, 23 Nov 2004 15:23:57 +0000
parents 28906724d6e3
children 212f5b190a89
comparison
equal deleted inserted replaced
58459:d9e5fd89f5cf 58460:fbd266022300
420 (setcar (nthcdr 2 copy) newdef) 420 (setcar (nthcdr 2 copy) newdef)
421 copy) 421 copy)
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.
429 (if (and (keymapp inner-def) 430 (if (and (keymapp inner-def)
430 ;; Avoid recursively scanning 431 ;; Avoid recursively scanning