[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b7d4c5d: help-follow-symbol now complains if no symbol found (bug
From: |
Juanma Barranquero |
Subject: |
master b7d4c5d: help-follow-symbol now complains if no symbol found (bug#38248) |
Date: |
Fri, 22 Nov 2019 15:11:23 -0500 (EST) |
branch: master
commit b7d4c5d1d1b55fea8382663f18263e2000678be5
Author: Juanma Barranquero <address@hidden>
Commit: Juanma Barranquero <address@hidden>
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.
---
etc/NEWS | 4 ++++
lisp/help-mode.el | 9 +++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index b92fdeb..ad349b1 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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
scrolling.
+---
+** 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
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 054a1ef..e70570c 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -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_")
(point)))))))
- (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? "))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master b7d4c5d: help-follow-symbol now complains if no symbol found (bug#38248),
Juanma Barranquero <=