]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor shortdoc link improvements
authorDaniel Martín <mardani29@yahoo.es>
Sun, 10 Jan 2021 12:45:44 +0000 (13:45 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 10 Jan 2021 12:45:44 +0000 (13:45 +0100)
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Use
describe-function as a fallback link when a function is not documented
in any Info manual.  Also make the link respond to mouse-1, like the
rest of *Help* links, and add a proper help-echo property.
* lisp/help-fns.el (help-fns--mention-shortdoc-groups): Same link
improvement as described before, this time for the shortdoc groups
(bug#45750).

lisp/emacs-lisp/shortdoc.el
lisp/help-fns.el

index 698467e939e8359ccaf52ca01ca1889b8e5f01e6..39e69f5aab9f38b7816330a5ff06c0a606e43824 100644 (file)
@@ -1126,12 +1126,21 @@ There can be any number of :example/:result elements."
     (insert (propertize "("
                         'shortdoc-function t))
     (if (plist-get data :no-manual)
-        (insert (symbol-name function))
+        (insert-text-button
+         (symbol-name function)
+         'face 'button
+         'action (lambda (_)
+                   (describe-function function))
+         'follow-link t
+         'help-echo (purecopy "mouse-1, RET: describe function"))
       (insert-text-button
        (symbol-name function)
        'face 'button
        'action (lambda (_)
-                 (info-lookup-symbol function 'emacs-lisp-mode))))
+                 (info-lookup-symbol function 'emacs-lisp-mode))
+       'follow-link t
+       'help-echo (purecopy "mouse-1, RET: show \
+function's documentation in the Info manual")))
     (setq arglist-start (point))
     (insert ")\n")
     ;; Doc string.
index afbb5e3649e366efddc07905a59d81b883b0c30f..d559221a8271267700b1cd230ff615aa0ab8c943 100644 (file)
@@ -713,7 +713,9 @@ FILE is the file where FUNCTION was probably defined."
            (insert-text-button
             (symbol-name group)
             'action (lambda (_)
-                      (shortdoc-display-group group))))
+                      (shortdoc-display-group group))
+            'follow-link t
+            'help-echo (purecopy "mouse-1, RET: show documentation group")))
          groups)
         (insert (if (= (length groups) 1)
                     " group.\n"