aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLuc Teirlinck2003-11-30 17:50:54 +0000
committerLuc Teirlinck2003-11-30 17:50:54 +0000
commit7ada28ac7e1bbe8a8d0f6c66a80cf3696be41aad (patch)
tree6f990d2a0da255833263c6881ba2ae8965cb2b04 /lisp
parentcc53141205256795ddcb2b5d5d0ec14027dfd8fb (diff)
downloademacs-7ada28ac7e1bbe8a8d0f6c66a80cf3696be41aad.tar.gz
emacs-7ada28ac7e1bbe8a8d0f6c66a80cf3696be41aad.zip
(help-map): Bind `display-local-help' to `C-h .'.
(help-for-help): Add `C-h .' to the listed Help options. Remove trailing whitespace.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/help.el25
1 files changed, 14 insertions, 11 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 770bcabb964..82a43c6868b 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -49,6 +49,7 @@
49(define-key help-map (char-to-string help-char) 'help-for-help) 49(define-key help-map (char-to-string help-char) 'help-for-help)
50(define-key help-map [help] 'help-for-help) 50(define-key help-map [help] 'help-for-help)
51(define-key help-map [f1] 'help-for-help) 51(define-key help-map [f1] 'help-for-help)
52(define-key help-map "." 'display-local-help)
52(define-key help-map "?" 'help-for-help) 53(define-key help-map "?" 'help-for-help)
53 54
54(define-key help-map "\C-c" 'describe-copying) 55(define-key help-map "\C-c" 'describe-copying)
@@ -177,7 +178,7 @@ If FUNCTION is nil, it applies `message', thus displaying the message."
177 178
178(defalias 'help 'help-for-help) 179(defalias 'help 'help-for-help)
179(make-help-screen help-for-help 180(make-help-screen help-for-help
180 "a b c C e f F i I k C-k l L m p s t v w C-c C-d C-f C-n C-p C-t C-w or ? :" 181 "a b c C e f F i I k C-k l L m p s t v w C-c C-d C-f C-n C-p C-t C-w . or ? :"
181 "You have typed %THIS-KEY%, the help character. Type a Help option: 182 "You have typed %THIS-KEY%, the help character. Type a Help option:
182\(Use SPC or DEL to scroll through this text. Type \\<help-map>\\[help-quit] to exit the Help command.) 183\(Use SPC or DEL to scroll through this text. Type \\<help-map>\\[help-quit] to exit the Help command.)
183 184
@@ -217,6 +218,8 @@ v describe-variable. Type name of a variable;
217 it displays the variable's documentation and value. 218 it displays the variable's documentation and value.
218w where-is. Type command name; it prints which keystrokes 219w where-is. Type command name; it prints which keystrokes
219 invoke that command. 220 invoke that command.
221. display-local-help. Display any available local help at point
222 in the echo area.
220 223
221C-c Display Emacs copying permission (GNU General Public License). 224C-c Display Emacs copying permission (GNU General Public License).
222C-d Display Emacs ordering information. 225C-d Display Emacs ordering information.
@@ -637,7 +640,7 @@ follows the description of the major mode.)\n\n"))
637 "Display documentation of a minor mode given as MINOR-MODE. 640 "Display documentation of a minor mode given as MINOR-MODE.
638MINOR-MODE can be a minor mode symbol or a minor mode indicator string 641MINOR-MODE can be a minor mode symbol or a minor mode indicator string
639appeared on the mode-line." 642appeared on the mode-line."
640 (interactive (list (completing-read 643 (interactive (list (completing-read
641 "Minor mode: " 644 "Minor mode: "
642 (nconc 645 (nconc
643 (describe-minor-mode-completion-table-for-symbol) 646 (describe-minor-mode-completion-table-for-symbol)
@@ -655,14 +658,14 @@ appeared on the mode-line."
655 (t 658 (t
656 (error "No such minor mode: %s" minor-mode))))) 659 (error "No such minor mode: %s" minor-mode)))))
657 660
658;; symbol 661;; symbol
659(defun describe-minor-mode-completion-table-for-symbol () 662(defun describe-minor-mode-completion-table-for-symbol ()
660 ;; In order to list up all minor modes, minor-mode-list 663 ;; In order to list up all minor modes, minor-mode-list
661 ;; is used here instead of minor-mode-alist. 664 ;; is used here instead of minor-mode-alist.
662 (delq nil (mapcar 'symbol-name minor-mode-list))) 665 (delq nil (mapcar 'symbol-name minor-mode-list)))
663(defun describe-minor-mode-from-symbol (symbol) 666(defun describe-minor-mode-from-symbol (symbol)
664 "Display documentation of a minor mode given as a symbol, SYMBOL" 667 "Display documentation of a minor mode given as a symbol, SYMBOL"
665 (interactive (list (intern (completing-read 668 (interactive (list (intern (completing-read
666 "Minor mode symbol: " 669 "Minor mode symbol: "
667 (describe-minor-mode-completion-table-for-symbol))))) 670 (describe-minor-mode-completion-table-for-symbol)))))
668 (if (fboundp symbol) 671 (if (fboundp symbol)
@@ -671,7 +674,7 @@ appeared on the mode-line."
671 674
672;; indicator 675;; indicator
673(defun describe-minor-mode-completion-table-for-indicator () 676(defun describe-minor-mode-completion-table-for-indicator ()
674 (delq nil 677 (delq nil
675 (mapcar (lambda (x) 678 (mapcar (lambda (x)
676 (let ((i (format-mode-line x))) 679 (let ((i (format-mode-line x)))
677 ;; remove first space if existed 680 ;; remove first space if existed
@@ -680,15 +683,15 @@ appeared on the mode-line."
680 nil) 683 nil)
681 ((eq (aref i 0) ?\ ) 684 ((eq (aref i 0) ?\ )
682 (substring i 1)) 685 (substring i 1))
683 (t 686 (t
684 i)))) 687 i))))
685 minor-mode-alist))) 688 minor-mode-alist)))
686(defun describe-minor-mode-from-indicator (indicator) 689(defun describe-minor-mode-from-indicator (indicator)
687 "Display documentation of a minor mode specified by INDICATOR. 690 "Display documentation of a minor mode specified by INDICATOR.
688If you call this function interactively, you can give indicator which 691If you call this function interactively, you can give indicator which
689is currently activated with completion." 692is currently activated with completion."
690 (interactive (list 693 (interactive (list
691 (completing-read 694 (completing-read
692 "Minor mode indicator: " 695 "Minor mode indicator: "
693 (describe-minor-mode-completion-table-for-indicator)))) 696 (describe-minor-mode-completion-table-for-indicator))))
694 (let ((minor-mode (lookup-minor-mode-from-indicator indicator))) 697 (let ((minor-mode (lookup-minor-mode-from-indicator indicator)))
@@ -699,17 +702,17 @@ is currently activated with completion."
699(defun lookup-minor-mode-from-indicator (indicator) 702(defun lookup-minor-mode-from-indicator (indicator)
700 "Return a minor mode symbol from its indicator on the modeline." 703 "Return a minor mode symbol from its indicator on the modeline."
701 ;; remove first space if existed 704 ;; remove first space if existed
702 (if (and (< 0 (length indicator)) 705 (if (and (< 0 (length indicator))
703 (eq (aref indicator 0) ?\ )) 706 (eq (aref indicator 0) ?\ ))
704 (setq indicator (substring indicator 1))) 707 (setq indicator (substring indicator 1)))
705 (let ((minor-modes minor-mode-alist) 708 (let ((minor-modes minor-mode-alist)
706 result) 709 result)
707 (while minor-modes 710 (while minor-modes
708 (let* ((minor-mode (car (car minor-modes))) 711 (let* ((minor-mode (car (car minor-modes)))
709 (anindicator (format-mode-line 712 (anindicator (format-mode-line
710 (car (cdr (car minor-modes)))))) 713 (car (cdr (car minor-modes))))))
711 ;; remove first space if existed 714 ;; remove first space if existed
712 (if (and (stringp anindicator) 715 (if (and (stringp anindicator)
713 (> (length anindicator) 0) 716 (> (length anindicator) 0)
714 (eq (aref anindicator 0) ?\ )) 717 (eq (aref anindicator 0) ?\ ))
715 (setq anindicator (substring anindicator 1))) 718 (setq anindicator (substring anindicator 1)))