emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/help.el


From: Luc Teirlinck
Subject: [Emacs-diffs] Changes to emacs/lisp/help.el
Date: Sun, 30 Nov 2003 12:50:55 -0500

Index: emacs/lisp/help.el
diff -c emacs/lisp/help.el:1.261 emacs/lisp/help.el:1.262
*** emacs/lisp/help.el:1.261    Tue Sep 30 08:50:44 2003
--- emacs/lisp/help.el  Sun Nov 30 12:50:54 2003
***************
*** 49,54 ****
--- 49,55 ----
  (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,183 ****
  
  (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 ? :"
    "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.)
  
--- 178,184 ----
  
  (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 ? 
:"
    "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,222 ****
--- 218,225 ----
        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,643 ****
    "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 
                      "Minor mode: "
                              (nconc
                               (describe-minor-mode-completion-table-for-symbol)
--- 640,646 ----
    "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
                      "Minor mode: "
                              (nconc
                               (describe-minor-mode-completion-table-for-symbol)
***************
*** 655,668 ****
       (t
        (error "No such minor mode: %s" minor-mode)))))
  
! ;; 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 
                              "Minor mode symbol: "
                              
(describe-minor-mode-completion-table-for-symbol)))))
    (if (fboundp symbol)
--- 658,671 ----
       (t
        (error "No such minor mode: %s" minor-mode)))))
  
! ;; 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
                              "Minor mode symbol: "
                              
(describe-minor-mode-completion-table-for-symbol)))))
    (if (fboundp symbol)
***************
*** 671,677 ****
  
  ;; indicator
  (defun describe-minor-mode-completion-table-for-indicator ()
!   (delq nil 
        (mapcar (lambda (x)
                  (let ((i (format-mode-line x)))
                    ;; remove first space if existed
--- 674,680 ----
  
  ;; indicator
  (defun describe-minor-mode-completion-table-for-indicator ()
!   (delq nil
        (mapcar (lambda (x)
                  (let ((i (format-mode-line x)))
                    ;; remove first space if existed
***************
*** 680,694 ****
                      nil)
                     ((eq (aref i 0) ?\ )
                      (substring i 1))
!                    (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 
                 "Minor mode indicator: "
                 (describe-minor-mode-completion-table-for-indicator))))
    (let ((minor-mode (lookup-minor-mode-from-indicator indicator)))
--- 683,697 ----
                      nil)
                     ((eq (aref i 0) ?\ )
                      (substring i 1))
!                    (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
                 "Minor mode indicator: "
                 (describe-minor-mode-completion-table-for-indicator))))
    (let ((minor-mode (lookup-minor-mode-from-indicator indicator)))
***************
*** 699,715 ****
  (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)) 
           (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 
                           (car (cdr (car minor-modes))))))
        ;; remove first space if existed
!       (if (and (stringp anindicator) 
                 (> (length anindicator) 0)
                 (eq (aref anindicator 0) ?\ ))
            (setq anindicator (substring anindicator 1)))
--- 702,718 ----
  (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))
           (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
                           (car (cdr (car minor-modes))))))
        ;; remove first space if existed
!       (if (and (stringp anindicator)
                 (> (length anindicator) 0)
                 (eq (aref anindicator 0) ?\ ))
            (setq anindicator (substring anindicator 1)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]