(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)
(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.)
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.
"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)
(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)
;; 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
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)))
(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)))