mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Make `describe-mode' include a link to the major mode function
* lisp/help-fns.el (describe-mode): Add a link to the mode function so that the user can go to the manual more easily (bug#575).
This commit is contained in:
parent
2e0a2ecc29
commit
6b16092a8d
1 changed files with 10 additions and 6 deletions
|
|
@ -1952,12 +1952,16 @@ documentation for the major and minor modes of that buffer."
|
|||
|
||||
(princ "\n(Information about these minor modes follows the major mode info.)\n\n"))
|
||||
;; Document the major mode.
|
||||
(let ((mode mode-name))
|
||||
(with-current-buffer standard-output
|
||||
(let ((start (point)))
|
||||
(insert (format-mode-line mode nil nil buffer))
|
||||
(add-text-properties start (point) '(face bold)))))
|
||||
(princ " mode")
|
||||
(with-current-buffer standard-output
|
||||
(insert (buttonize
|
||||
(propertize (format-mode-line
|
||||
(buffer-local-value 'mode-name buffer)
|
||||
nil nil buffer)
|
||||
'face 'bold)
|
||||
(lambda (_)
|
||||
(describe-function
|
||||
(buffer-local-value 'major-mode buffer))))))
|
||||
(princ " mode")
|
||||
(let* ((mode major-mode)
|
||||
(file-name (find-lisp-object-file-name mode nil)))
|
||||
(if (not file-name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue