@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}.
+@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.
@end table
@node Key Help
** Help
++++
+*** The 'C-h .' command now takes a prefix to display button/widget help.
+'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.
+
---
*** New user option 'help-enable-variable-value-editing'.
If enabled, 'e' on a value in *Help* will pop you to a new buffer
(if (and kbd (not (eq kbd t))) kbd echo)))
;;;###autoload
-(defun display-local-help (&optional arg)
+(defun display-local-help (&optional inhibit-warning describe-button)
"Display local help in the echo area.
-This displays a short help message, namely the string produced by
-the `kbd-help' property at point. If `kbd-help' does not produce
-a string, but the `help-echo' property does, then that string is
-printed instead.
+This command, by default, displays a short help message, namely
+the string produced by the `kbd-help' property at point. If
+`kbd-help' does not produce a string, but the `help-echo'
+property does, then that string is printed instead.
The string is passed through `substitute-command-keys' before it
is displayed.
-A numeric argument ARG prevents display of a message in case
-there is no help. While ARG can be used interactively, it is
-mainly meant for use from Lisp."
- (interactive "P")
+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
+button/widget instead."
+ (interactive (list nil current-prefix-arg))
(let ((help (help-at-pt-kbd-string)))
- (if help
- (message "%s" (substitute-command-keys help))
- (if (not arg) (message "No local help at point")))))
+ (cond
+ ((and describe-button (button-at (point)))
+ (button-describe))
+ ((and describe-button (widget-at (point)))
+ (widget-describe))
+ (help
+ (message "%s" (substitute-command-keys help)))
+ ((not inhibit-warning)
+ (message "No local help at point")))))
(defvar help-at-pt-timer nil
"Non-nil means that a timer is set that checks for local help.