changeset 53204:0fd777e399e3

(help-map): Bind `display-local-help' to `C-h .'. (help-for-help): Add `C-h .' to the listed Help options. Remove trailing whitespace.
author Luc Teirlinck <teirllm@auburn.edu>
date Sun, 30 Nov 2003 17:50:54 +0000
parents 14b91211c987
children ed27adf8b7ac
files lisp/help.el
diffstat 1 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help.el	Sun Nov 30 17:32:54 2003 +0000
+++ b/lisp/help.el	Sun Nov 30 17:50:54 2003 +0000
@@ -49,6 +49,7 @@
 (define-key help-map (char-to-string help-char) 'help-for-help)
 (define-key help-map [help] 'help-for-help)
 (define-key help-map [f1] 'help-for-help)
+(define-key help-map "." 'display-local-help)
 (define-key help-map "?" 'help-for-help)
 
 (define-key help-map "\C-c" 'describe-copying)
@@ -177,7 +178,7 @@
 
 (defalias 'help 'help-for-help)
 (make-help-screen help-for-help
-  "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 ? :"
+  "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 ? :"
   "You have typed %THIS-KEY%, the help character.  Type a Help option:
 \(Use SPC or DEL to scroll through this text.  Type \\<help-map>\\[help-quit] to exit the Help command.)
 
@@ -217,6 +218,8 @@
 	it displays the variable's documentation and value.
 w  where-is.  Type command name; it prints which keystrokes
 	invoke that command.
+.  display-local-help.  Display any available local help at point
+        in the echo area.
 
 C-c Display Emacs copying permission (GNU General Public License).
 C-d Display Emacs ordering information.
@@ -637,7 +640,7 @@
   "Display documentation of a minor mode given as MINOR-MODE.
 MINOR-MODE can be a minor mode symbol or a minor mode indicator string
 appeared on the mode-line."
-  (interactive (list (completing-read 
+  (interactive (list (completing-read
 		      "Minor mode: "
 			      (nconc
 			       (describe-minor-mode-completion-table-for-symbol)
@@ -655,14 +658,14 @@
      (t
       (error "No such minor mode: %s" minor-mode)))))
 
-;; symbol    
+;; symbol
 (defun describe-minor-mode-completion-table-for-symbol ()
   ;; In order to list up all minor modes, minor-mode-list
   ;; is used here instead of minor-mode-alist.
   (delq nil (mapcar 'symbol-name minor-mode-list)))
 (defun describe-minor-mode-from-symbol (symbol)
   "Display documentation of a minor mode given as a symbol, SYMBOL"
-  (interactive (list (intern (completing-read 
+  (interactive (list (intern (completing-read
 			      "Minor mode symbol: "
 			      (describe-minor-mode-completion-table-for-symbol)))))
   (if (fboundp symbol)
@@ -671,7 +674,7 @@
 
 ;; indicator
 (defun describe-minor-mode-completion-table-for-indicator ()
-  (delq nil 
+  (delq nil
 	(mapcar (lambda (x)
 		  (let ((i (format-mode-line x)))
 		    ;; remove first space if existed
@@ -680,15 +683,15 @@
 		      nil)
 		     ((eq (aref i 0) ?\ )
 		      (substring i 1))
-		     (t 
+		     (t
 		      i))))
 		minor-mode-alist)))
 (defun describe-minor-mode-from-indicator (indicator)
   "Display documentation of a minor mode specified by INDICATOR.
 If you call this function interactively, you can give indicator which
 is currently activated with completion."
-  (interactive (list 
-		(completing-read 
+  (interactive (list
+		(completing-read
 		 "Minor mode indicator: "
 		 (describe-minor-mode-completion-table-for-indicator))))
   (let ((minor-mode (lookup-minor-mode-from-indicator indicator)))
@@ -699,17 +702,17 @@
 (defun lookup-minor-mode-from-indicator (indicator)
   "Return a minor mode symbol from its indicator on the modeline."
   ;; remove first space if existed
-  (if (and (< 0 (length indicator)) 
+  (if (and (< 0 (length indicator))
 	   (eq (aref indicator 0) ?\ ))
       (setq indicator (substring indicator 1)))
   (let ((minor-modes minor-mode-alist)
 	result)
     (while minor-modes
       (let* ((minor-mode (car (car minor-modes)))
-	     (anindicator (format-mode-line 
+	     (anindicator (format-mode-line
 			   (car (cdr (car minor-modes))))))
 	;; remove first space if existed
-	(if (and (stringp anindicator) 
+	(if (and (stringp anindicator)
 		 (> (length anindicator) 0)
 		 (eq (aref anindicator 0) ?\ ))
 	    (setq anindicator (substring anindicator 1)))