Commit b7d4c5d1 authored by Juanma Barranquero's avatar Juanma Barranquero

help-follow-symbol now complains if no symbol found (bug#38248)

* lisp/help-mode.el (help-follow-symbol): Signal 'user-error' if
there's no symbol at POS.

* etc/NEWS: Document it.
parent 0b4eec31
Pipeline #4140 failed with stage
in 61 minutes and 5 seconds
......@@ -2588,6 +2588,10 @@ pointer is over. To change this behaviour, you can customize the user
option 'mouse-wheel-follow-mouse'. Note that this will also affect
** help-follow-symbol now signals 'user-error' if point (or the
position pointed to by the argument POS) is not in a symbol.
* Lisp Changes in Emacs 27.1
......@@ -749,10 +749,11 @@ Show all docs for that symbol as either a variable, function or face."
(buffer-substring (point)
(progn (skip-syntax-forward "w_")
(when (or (boundp sym)
(get sym 'variable-documentation)
(fboundp sym) (facep sym))
(help-do-xref pos #'describe-symbol (list sym)))))
(if (or (boundp sym)
(get sym 'variable-documentation)
(fboundp sym) (facep sym))
(help-do-xref pos #'describe-symbol (list sym))
(user-error "No symbol here"))))
(defun help-mode-revert-buffer (_ignore-auto noconfirm)
(when (or noconfirm (yes-or-no-p "Revert help buffer? "))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment