/[emacs]/emacs/lisp/help.el
ViewVC logotype

Diff of /emacs/lisp/help.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.259.4.4 by miles, Sat Sep 4 09:14:25 2004 UTC revision 1.259.4.5 by miles, Thu Oct 14 08:49:59 2004 UTC
# Line 111  Line 111 
111    
112  (define-key help-map "q" 'help-quit)  (define-key help-map "q" 'help-quit)
113    
114    ;; insert-button makes the action nil if it is not store somewhere
115    (defvar help-button-cache nil)
116    
117    
118  (defun help-quit ()  (defun help-quit ()
119    "Just exit from the Help command's command loop."    "Just exit from the Help command's command loop."
# Line 655  whose documentation describes the minor Line 658  whose documentation describes the minor
658                      (lambda (a b) (string-lessp (car a) (car b)))))                      (lambda (a b) (string-lessp (car a) (car b)))))
659          (when minor-modes          (when minor-modes
660            (princ "Summary of minor modes:\n")            (princ "Summary of minor modes:\n")
661            (dolist (mode minor-modes)            (make-local-variable 'help-button-cache)
662              (let ((pretty-minor-mode (nth 0 mode))            (with-current-buffer standard-output
663                    (indicator (nth 2 mode)))              (dolist (mode minor-modes)
664                (princ (format "  %s minor mode (%s):\n"                (let ((pretty-minor-mode (nth 0 mode))
665                               pretty-minor-mode                      (mode-function (nth 1 mode))
666                               (if indicator                      (indicator (nth 2 mode)))
667                                   (format "indicator%s" indicator)                  (add-text-properties 0 (length pretty-minor-mode)
668                                 "no indicator")))))                                       '(face bold) pretty-minor-mode)
669                    (save-excursion
670                      (goto-char (point-max))
671                      (princ "\n\f\n")
672                      (push (point-marker) help-button-cache)
673                      ;; Document the minor modes fully.
674                      (insert pretty-minor-mode)
675                      (princ (format " minor mode (%s):\n"
676                                     (if indicator
677                                         (format "indicator%s" indicator)
678                                       "no indicator")))
679                      (princ (documentation mode-function)))
680                    (princ "  ")
681                    (insert-button pretty-minor-mode
682                                   'action (car help-button-cache)
683                                   'help-echo "mouse-2, RET: show full information")
684                    (princ (format " minor mode (%s):\n"
685                                   (if indicator
686                                       (format "indicator%s" indicator)
687                                     "no indicator"))))))
688            (princ "\n(Full information about these minor modes            (princ "\n(Full information about these minor modes
689  follows the description of the major mode.)\n\n"))  follows the description of the major mode.)\n\n"))
690          ;; Document the major mode.          ;; Document the major mode.
691          (princ mode-name)          (let ((mode mode-name))
692              (with-current-buffer standard-output
693                (insert mode)
694                (add-text-properties (- (point) (length mode)) (point) '(face bold))))
695          (princ " mode:\n")          (princ " mode:\n")
696          (princ (documentation major-mode))          (princ (documentation major-mode)))
         ;; Document the minor modes fully.  
         (dolist (mode minor-modes)  
           (let ((pretty-minor-mode (nth 0 mode))  
                 (mode-function (nth 1 mode))  
                 (indicator (nth 2 mode)))  
             (princ "\n\f\n")  
             (princ (format "%s minor mode (%s):\n"  
                            pretty-minor-mode  
                            (if indicator  
                                (format "indicator%s" indicator)  
                              "no indicator")))  
             (princ (documentation mode-function)))))  
697        (print-help-return-message))))        (print-help-return-message))))
698    
699    

Legend:
Removed from v.1.259.4.4  
changed lines
  Added in v.1.259.4.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26