unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5474: 23.1.91.1; describe-mode does not offer link to the .el
@ 2010-01-25 17:18 jidanni
  2010-01-25 17:54 ` Juri Linkov
  2010-02-20  3:03 ` bug#5474: C-h m doesn't give link to .el jidanni
  0 siblings, 2 replies; 3+ messages in thread
From: jidanni @ 2010-01-25 17:18 UTC (permalink / raw)
  To: 5474

We hit C-h m. We see the following:

  XXXX mode:
  Major mode for editing XXXX.

  key             binding
  ---             -------

  C-c		Prefix Command
  ESC		Prefix Command

  C-M-x		XXXX-eval-defun

Nowhere is there a link to XXXX.el.
We have to hit XXXX-eval-defun to get a link to XXXX.el.

It should say at top
  XXXX mode:
  Major mode for editing XXXX. Defined in XXXX.el <---clickable.

Or
  XXXX mode (... XXXX-mode, defined in XXXX.el):
  Major mode for editing XXXX.







^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#5474: 23.1.91.1; describe-mode does not offer link to the .el
  2010-01-25 17:18 bug#5474: 23.1.91.1; describe-mode does not offer link to the .el jidanni
@ 2010-01-25 17:54 ` Juri Linkov
  2010-02-20  3:03 ` bug#5474: C-h m doesn't give link to .el jidanni
  1 sibling, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2010-01-25 17:54 UTC (permalink / raw)
  To: jidanni; +Cc: 5474

> We hit C-h m. We see the following:
>
>   XXXX mode:
>   Major mode for editing XXXX.
>
>   key             binding
>   ---             -------
>
>   C-c		Prefix Command
>   ESC		Prefix Command
>
>   C-M-x		XXXX-eval-defun
>
> Nowhere is there a link to XXXX.el.
> We have to hit XXXX-eval-defun to get a link to XXXX.el.
>
> It should say at top
>   XXXX mode:
>   Major mode for editing XXXX. Defined in XXXX.el <---clickable.
>
> Or
>   XXXX mode (... XXXX-mode, defined in XXXX.el):
>   Major mode for editing XXXX.

This can be implemented after feature freeze with the following patch
that adds links to the major/minor mode names for `C-h m':

Index: emacs/lisp/help.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/help.el,v
retrieving revision 1.327
diff -u -r1.327 help.el
--- emacs/lisp/help.el	21 Mar 2007 16:15:45 -0000	1.327
+++ emacs/lisp/help.el	5 May 2007 17:01:30 -0000
@@ -815,7 +815,12 @@
 		  (princ "\n\f\n")
 		  (push (point-marker) help-button-cache)
 		  ;; Document the minor modes fully.
-		  (insert pretty-minor-mode)
+		  (insert-button pretty-minor-mode
+				 'action `(lambda (button)
+					    (describe-function ',mode-function))
+				 'follow-link t
+				 'help-echo (format "mouse-2, RET: show information about %S"
+						    mode-function))
 		  (princ (format " minor mode (%s):\n"
 				 (if (zerop (length indicator))
 				     "no indicator"
@@ -833,10 +838,15 @@
 
 	  (princ "\n(Information about these minor modes follows the major mode info.)\n\n"))
 	;; Document the major mode.
-	(let ((mode mode-name))
+	(let ((major-mode-function major-mode) (mode mode-name))
 	  (with-current-buffer standard-output
             (let ((start (point)))
-              (insert (format-mode-line mode))
+	      (insert-button (format-mode-line mode)
+			     'action `(lambda (button)
+					(describe-function ',major-mode-function))
+			     'follow-link t
+			     'help-echo (format "mouse-2, RET: show information about %S"
+						major-mode-function))
               (add-text-properties start (point) '(face bold)))))
 	(princ " mode:\n")
 	(princ (documentation major-mode)))

-- 
Juri Linkov
http://www.jurta.org/emacs/






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#5474: C-h m doesn't give link to .el
  2010-01-25 17:18 bug#5474: 23.1.91.1; describe-mode does not offer link to the .el jidanni
  2010-01-25 17:54 ` Juri Linkov
@ 2010-02-20  3:03 ` jidanni
  1 sibling, 0 replies; 3+ messages in thread
From: jidanni @ 2010-02-20  3:03 UTC (permalink / raw)
  To: juri; +Cc: 5474

Still not working in emacs-snapshot 1:20100217-1, e.g., upon
M-x ibuffer C-h m.






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-20  3:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-25 17:18 bug#5474: 23.1.91.1; describe-mode does not offer link to the .el jidanni
2010-01-25 17:54 ` Juri Linkov
2010-02-20  3:03 ` bug#5474: C-h m doesn't give link to .el jidanni

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).