From: Karl Chen <quarl@cs.berkeley.edu>
Subject: function-called-at-point: ignore-errors around find-tag-default
Date: Sun, 13 Feb 2005 20:31:30 -0800 [thread overview]
Message-ID: <quack.20050213T2031.87mzu74va5@quack.cs.berkeley.edu> (raw)
Hi,
In some modes (tex-mode), `find-tag-default' can misbehave and
error.
It is annoying if you cannot `describe-function' or
`describe-variable' in such a mode, so I propose the following
patch. (`function-called-at-point' and `variable-at-point'
already use condition-cases. But an alternative would be to wrap
`find-tag-default' itself in a condition-case.)
--- /usr/local/stow/emacs-cvs/share/emacs/22.0.50/lisp/.backup/help.el.~1~ 2005-02-09 22:46:42.000000000 -0800
+++ /usr/local/stow/emacs-cvs/share/emacs/22.0.50/lisp/help.el 2005-02-13 20:10:05.000000000 -0800
@@ -273,7 +273,7 @@
(let ((obj (read (current-buffer))))
(and (symbolp obj) (fboundp obj) obj))))
(error nil))))
- (let* ((str (find-tag-default))
+ (let* ((str (condition-case () (find-tag-default) (error nil)))
(sym (if str (intern-soft str))))
(if (and sym (fboundp sym))
sym
--- /usr/local/stow/emacs-cvs/share/emacs/22.0.50/lisp/.backup/help-fns.el.~1~ 2005-02-03 11:41:14.000000000 -0800
+++ /usr/local/stow/emacs-cvs/share/emacs/22.0.50/lisp/help-fns.el 2005-02-13 20:20:59.000000000 -0800
@@ -487,7 +487,7 @@
(let ((obj (read (current-buffer))))
(and (symbolp obj) (boundp obj) obj))))
(error nil))
- (let* ((str (find-tag-default))
+ (let* ((str (condition-case () (find-tag-default) (error nil)))
(sym (if str (intern-soft str))))
(if (and sym (or any-symbol (boundp sym)))
sym
--
Karl 2005-02-13 20:24
next reply other threads:[~2005-02-14 4:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-14 4:31 Karl Chen [this message]
2005-02-14 13:40 ` function-called-at-point: ignore-errors around find-tag-default Stefan Monnier
2005-02-14 19:06 ` Karl Chen
2005-02-15 6:15 ` Richard Stallman
2005-02-17 3:56 ` Karl Chen
2005-02-17 13:14 ` Stefan Monnier
2005-02-17 23:09 ` Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=quack.20050213T2031.87mzu74va5@quack.cs.berkeley.edu \
--to=quarl@cs.berkeley.edu \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.