Mercurial > emacs
comparison lisp/help.el @ 67204:0ae69a6a591d
* help.el (describe-key-briefly, describe-key): Recognize default
bindings.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 29 Nov 2005 15:42:42 +0000 |
parents | 3b10c3dd0139 |
children | 1a4439fe2adc |
comparison
equal
deleted
inserted
replaced
67203:78e1225a40a2 | 67204:0ae69a6a591d |
---|---|
588 (progn | 588 (progn |
589 (set-buffer (window-buffer window)) | 589 (set-buffer (window-buffer window)) |
590 (goto-char position))) | 590 (goto-char position))) |
591 ;; Ok, now look up the key and name the command. | 591 ;; Ok, now look up the key and name the command. |
592 (let ((defn (or (string-key-binding key) | 592 (let ((defn (or (string-key-binding key) |
593 (key-binding key))) | 593 (key-binding key t))) |
594 key-desc) | 594 key-desc) |
595 ;; Don't bother user with strings from (e.g.) the select-paste menu. | 595 ;; Don't bother user with strings from (e.g.) the select-paste menu. |
596 (if (stringp (aref key (1- (length key)))) | 596 (if (stringp (aref key (1- (length key)))) |
597 (aset key (1- (length key)) "(any string)")) | 597 (aset key (1- (length key)) "(any string)")) |
598 (if (and (> (length untranslated) 0) | 598 (if (and (> (length untranslated) 0) |
633 (setq window (posn-window (event-start (aref key 0))) | 633 (setq window (posn-window (event-start (aref key 0))) |
634 position (posn-point (event-start (aref key 0))))) | 634 position (posn-point (event-start (aref key 0))))) |
635 (when (windowp window) | 635 (when (windowp window) |
636 (set-buffer (window-buffer window)) | 636 (set-buffer (window-buffer window)) |
637 (goto-char position)) | 637 (goto-char position)) |
638 (let ((defn (or (string-key-binding key) (key-binding key)))) | 638 (let ((defn (or (string-key-binding key) (key-binding key t)))) |
639 (if (or (null defn) (integerp defn) (equal defn 'undefined)) | 639 (if (or (null defn) (integerp defn) (equal defn 'undefined)) |
640 (message "%s is undefined" (help-key-description key untranslated)) | 640 (message "%s is undefined" (help-key-description key untranslated)) |
641 (help-setup-xref (list #'describe-function defn) (interactive-p)) | 641 (help-setup-xref (list #'describe-function defn) (interactive-p)) |
642 ;; Don't bother user with strings from (e.g.) the select-paste menu. | 642 ;; Don't bother user with strings from (e.g.) the select-paste menu. |
643 (if (stringp (aref key (1- (length key)))) | 643 (if (stringp (aref key (1- (length key)))) |