]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix last change 'display-local-help' and its documentation
authorEli Zaretskii <eliz@gnu.org>
Sun, 24 Apr 2022 12:47:08 +0000 (15:47 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 24 Apr 2022 12:47:08 +0000 (15:47 +0300)
* etc/NEWS:
* doc/emacs/help.texi (Help Summary): Fix typo and wording of
documentation of 'C-u C-h .'.
* lisp/help-at-pt.el (display-local-help): Avoid byte-compiler
warnings.  Fix wording of doc string.

doc/emacs/help.texi
etc/NEWS
lisp/help-at-pt.el

index ee3d898019ee9eec860ff9d12f49306084443957..a4b329d089041ad7aa54b8ee25e199658099d544 100644 (file)
@@ -182,9 +182,10 @@ programming language you are editing (@code{info-lookup-symbol}).
 @item C-h .
 Display the help message for a special text area, if point is in one
 (@code{display-local-help}).  (These include, for example, links in
-@file{*Help*} buffers.)  @xref{Help Echo}.  If you use a prefix for
-this command, and point as on a button or a widget, this command will
-pop to a new buffer that describes the button/widget.
+@file{*Help*} buffers.)  @xref{Help Echo}.  If you invoke
+this command with a prefix argument, @kbd{C-u C-h .}, and point is on
+a button or a widget, this command will pop a new buffer that
+describes that button/widget.
 @end table
 
 @node Key Help
index 48ff8c370872b6a0e822b074d53712dd7cae31bc..73df079ce5f2a1185cb8fd00b2dbaad67df2f383 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -417,10 +417,11 @@ command also works for non-Emoji characters.)
 ** Help
 
 +++
-*** The 'C-h .' command now takes a prefix to display button/widget help.
+*** The 'C-h .' command now accepts a prefix argument.
 'C-u C-h .' would previously inhibit displaying a warning message if
-there's no local help at point.  This has been changed to trigger a
-call 'button-describe'/'widget-describe' instead.
+there's no local help at point.  This has been changed to call
+call 'button-describe'/'widget-describe' and display button/widget
+help instead.
 
 ---
 *** New user option 'help-enable-variable-value-editing'.
index 5bdaa35c0bca484da61db34a3f79cf94b8bf5f77..1a6d374db097f74b64271d948152633498831382 100644 (file)
@@ -81,6 +81,9 @@ If this produces no string either, return nil."
        (echo (help-at-pt-string)))
     (if (and kbd (not (eq kbd t))) kbd echo)))
 
+(declare-function widget-describe "wid-edit" (&optional widget-or-pos))
+(declare-function widget-at "wid-edit" (&optional pos))
+
 ;;;###autoload
 (defun display-local-help (&optional inhibit-warning describe-button)
   "Display local help in the echo area.
@@ -95,8 +98,8 @@ is displayed.
 If INHIBIT-WARNING is non-nil, this prevents display of a message
 in case there is no help.
 
-If DESCRIBE-BUTTON in non-nil (interactively, the prefix), and
-there's a button/widget at point, pop to a buffer describing that
+If DESCRIBE-BUTTON in non-nil (interactively, the prefix arg), and
+there's a button/widget at point, pop a buffer describing that
 button/widget instead."
   (interactive (list nil current-prefix-arg))
   (let ((help (help-at-pt-kbd-string)))