]> git.eshelyaron.com Git - emacs.git/commitdiff
Make the minor modes in help buffers into buttons
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 27 Apr 2016 16:43:02 +0000 (18:43 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 27 Apr 2016 16:43:02 +0000 (18:43 +0200)
* lisp/help.el (describe-mode): Make the minor modes into
buttons to enable easier documentation traversal (bug#1149).

lisp/help.el

index baccf5988b8882bda14c658b0bbaf881b0def5e6..efbae39a002af155e80c87124cbd628f3d6b1de2 100644 (file)
@@ -946,14 +946,15 @@ documentation for the major and minor modes of that buffer."
              (let ((mode-function (nth 0 mode))
                    (pretty-minor-mode (nth 1 mode))
                    (indicator (nth 2 mode)))
-               (add-text-properties 0 (length pretty-minor-mode)
-                                    '(face bold) pretty-minor-mode)
                (save-excursion
                  (goto-char (point-max))
                  (princ "\n\f\n")
                  (push (point-marker) help-button-cache)
                  ;; Document the minor modes fully.
-                 (insert pretty-minor-mode)
+                  (insert-text-button
+                   pretty-minor-mode 'type 'help-function
+                   'help-args (list mode-function)
+                   'button '(t))
                  (princ (format " minor mode (%s):\n"
                                 (if (zerop (length indicator))
                                     "no indicator"