From: Juanma Barranquero <lekktu@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 38248@debbugs.gnu.org
Subject: bug#38248: help-follow-symbol silent when no symbol was found
Date: Fri, 22 Nov 2019 19:50:21 +0100 [thread overview]
Message-ID: <CAAeL0SQWgJ-mWowW7ErFcd1CDxnop9xTSPk8aSRcT9y2ren9XQ@mail.gmail.com> (raw)
In-Reply-To: <875zjdxnzw.fsf@gnus.org>
[-- Attachment #1.1: Type: text/plain, Size: 58 bytes --]
Eli, are you OK with this (slightly) incompatible change?
[-- Attachment #1.2: Type: text/html, Size: 83 bytes --]
[-- Attachment #2: 0001-help-follow-symbol-now-tells-that-no-symbol-was-foun.patch --]
[-- Type: application/octet-stream, Size: 1678 bytes --]
From 088bd2ab28ef17a0cba02ea47aca6a02da1ce939 Mon Sep 17 00:00:00 2001
From: Juanma Barranquero <lekktu@gmail.com>
Date: Fri, 22 Nov 2019 19:47:05 +0100
Subject: [PATCH] help-follow-symbol now tells that no symbol was found
* lisp/help-mode.el (help-follow-symbol): Signal user-error if
there's no symbol at point.
* 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 b92fdeb675..013336835d 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.
+
\f
* Lisp Changes in Emacs 27.1
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 054a1ef8c2..e70570c3ee 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -749,10 +749,11 @@ help-follow-symbol
(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? "))
--
2.23.0.windows.1
next prev parent reply other threads:[~2019-11-22 18:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-17 19:40 bug#38248: help-follow-symbol silent when no symbol was found Juanma Barranquero
2019-11-21 15:12 ` Lars Ingebrigtsen
2019-11-22 18:50 ` Juanma Barranquero [this message]
2019-11-22 19:25 ` Eli Zaretskii
2019-11-22 19:40 ` Juanma Barranquero
2019-11-22 19:52 ` Eli Zaretskii
2019-11-22 20:13 ` Juanma Barranquero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAeL0SQWgJ-mWowW7ErFcd1CDxnop9xTSPk8aSRcT9y2ren9XQ@mail.gmail.com \
--to=lekktu@gmail.com \
--cc=38248@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).