[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103640: lisp/help.el (describe-mode)
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103640: lisp/help.el (describe-mode): Link to the mode's definition. |
Date: |
Sun, 13 Mar 2011 02:57:40 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103640
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Sun 2011-03-13 02:57:40 +0100
message:
lisp/help.el (describe-mode): Link to the mode's definition.
modified:
lisp/ChangeLog
lisp/help.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-03-12 19:19:47 +0000
+++ b/lisp/ChangeLog 2011-03-13 01:57:40 +0000
@@ -1,3 +1,7 @@
+2011-03-13 Juanma Barranquero <address@hidden>
+
+ * help.el (describe-mode): Link to the mode's definition (bug#8185).
+
2011-03-12 Stefan Monnier <address@hidden>
* ebuff-menu.el (electric-buffer-menu-mode-map): Move initialization
=== modified file 'lisp/help.el'
--- a/lisp/help.el 2011-01-25 04:08:28 +0000
+++ b/lisp/help.el 2011-03-13 01:57:40 +0000
@@ -871,7 +871,17 @@
(let ((start (point)))
(insert (format-mode-line mode nil nil buffer))
(add-text-properties start (point) '(face bold)))))
- (princ " mode:\n")
+ (princ " mode")
+ (let* ((mode major-mode)
+ (file-name (find-lisp-object-file-name mode nil)))
+ (when file-name
+ (princ (concat " defined in `" (file-name-nondirectory file-name)
"'"))
+ ;; Make a hyperlink to the library.
+ (with-current-buffer standard-output
+ (save-excursion
+ (re-search-backward "`\\([^`']+\\)'" nil t)
+ (help-xref-button 1 'help-function-def mode file-name)))))
+ (princ ":\n")
(princ (documentation major-mode)))))
;; For the sake of IELM and maybe others
nil)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103640: lisp/help.el (describe-mode): Link to the mode's definition.,
Juanma Barranquero <=