aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2002-11-07 16:46:11 +0000
committerJuanma Barranquero2002-11-07 16:46:11 +0000
commit7a698dc1c55d52fda462485e9a44ae6b0807a05d (patch)
tree8f2b6ec25aa946adc3e276dcd86a7ef411e54961
parentcd21c04ac9ab2b67f1d67b700453e19370da42fa (diff)
downloademacs-7a698dc1c55d52fda462485e9a44ae6b0807a05d.tar.gz
emacs-7a698dc1c55d52fda462485e9a44ae6b0807a05d.zip
(where-is): Repport also aliases of the passed command.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/help.el47
2 files changed, 36 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9982b43a38c..e61a8894780 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12002-11-07 Juanma Barranquero <lektu@terra.es>
2
3 * help.el (where-is): Repport also aliases of the passed command.
4
12002-11-07 Markus Rost <rost@math.ohio-state.edu> 52002-11-07 Markus Rost <rost@math.ohio-state.edu>
2 6
3 * cus-dep.el (custom-make-dependencies): Fix comment inserted in 7 * cus-dep.el (custom-make-dependencies): Fix comment inserted in
diff --git a/lisp/help.el b/lisp/help.el
index 713dd6dfa23..eb54aec958b 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -420,21 +420,38 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer."
420 (list (if (equal val "") 420 (list (if (equal val "")
421 fn (intern val)) 421 fn (intern val))
422 current-prefix-arg))) 422 current-prefix-arg)))
423 (let* ((remapped (remap-command definition)) 423 (let ((func (indirect-function definition))
424 (keys (where-is-internal definition overriding-local-map nil nil remapped)) 424 (map nil)
425 (keys1 (mapconcat 'key-description keys ", ")) 425 (standard-output (if insert (current-buffer) t)))
426 (standard-output (if insert (current-buffer) t))) 426 (mapatoms #'(lambda (symbol)
427 (if insert 427 (when (and (not (eq symbol definition))
428 (if (> (length keys1) 0) 428 (fboundp symbol)
429 (if remapped 429 (eq func (indirect-function symbol)))
430 (princ (format "%s (%s) (remapped from %s)" keys1 remapped definition)) 430 (setq map (cons symbol map)))))
431 (princ (format "%s (%s)" keys1 definition))) 431 (princ (mapconcat
432 (princ (format "M-x %s RET" definition))) 432 #'(lambda (symbol)
433 (if (> (length keys1) 0) 433 (let* ((remapped (remap-command symbol))
434 (if remapped 434 (keys (mapconcat 'key-description
435 (princ (format "%s is remapped to %s which is on %s" definition remapped keys1)) 435 (where-is-internal symbol
436 (princ (format "%s is on %s" definition keys1))) 436 overriding-local-map
437 (princ (format "%s is not on any key" definition))))) 437 nil nil
438 remapped)
439 ", ")))
440 (if insert
441 (if (> (length keys) 0)
442 (if remapped
443 (format "%s (%s) (remapped from %s)"
444 keys remapped symbol)
445 (format "%s (%s)" keys symbol))
446 (format "M-x %s RET" symbol))
447 (if (> (length keys) 0)
448 (if remapped
449 (format "%s is remapped to %s which is on %s"
450 definition symbol keys)
451 (format "%s is on %s" symbol keys))
452 (format "%s is not on any key" symbol)))))
453 (cons definition map)
454 ";\nand ")))
438 nil) 455 nil)
439 456
440(defun string-key-binding (key) 457(defun string-key-binding (key)