diff options
| author | Lars Ingebrigtsen | 2016-04-27 18:43:02 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-04-27 18:43:02 +0200 |
| commit | b3500fc058ed4f294969b1ef1bf36b28bb3ebe43 (patch) | |
| tree | 65dc6db55e7da86a68cd9cdf0127deadaf0bdec6 | |
| parent | 1a08fb07546a4488511abb65bcae5c0d8b192c20 (diff) | |
| download | emacs-b3500fc058ed4f294969b1ef1bf36b28bb3ebe43.tar.gz emacs-b3500fc058ed4f294969b1ef1bf36b28bb3ebe43.zip | |
Make the minor modes in help buffers into buttons
* lisp/help.el (describe-mode): Make the minor modes into
buttons to enable easier documentation traversal (bug#1149).
| -rw-r--r-- | lisp/help.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/help.el b/lisp/help.el index baccf5988b8..efbae39a002 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -946,14 +946,15 @@ documentation for the major and minor modes of that buffer." | |||
| 946 | (let ((mode-function (nth 0 mode)) | 946 | (let ((mode-function (nth 0 mode)) |
| 947 | (pretty-minor-mode (nth 1 mode)) | 947 | (pretty-minor-mode (nth 1 mode)) |
| 948 | (indicator (nth 2 mode))) | 948 | (indicator (nth 2 mode))) |
| 949 | (add-text-properties 0 (length pretty-minor-mode) | ||
| 950 | '(face bold) pretty-minor-mode) | ||
| 951 | (save-excursion | 949 | (save-excursion |
| 952 | (goto-char (point-max)) | 950 | (goto-char (point-max)) |
| 953 | (princ "\n\f\n") | 951 | (princ "\n\f\n") |
| 954 | (push (point-marker) help-button-cache) | 952 | (push (point-marker) help-button-cache) |
| 955 | ;; Document the minor modes fully. | 953 | ;; Document the minor modes fully. |
| 956 | (insert pretty-minor-mode) | 954 | (insert-text-button |
| 955 | pretty-minor-mode 'type 'help-function | ||
| 956 | 'help-args (list mode-function) | ||
| 957 | 'button '(t)) | ||
| 957 | (princ (format " minor mode (%s):\n" | 958 | (princ (format " minor mode (%s):\n" |
| 958 | (if (zerop (length indicator)) | 959 | (if (zerop (length indicator)) |
| 959 | "no indicator" | 960 | "no indicator" |