all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* function-called-at-point: ignore-errors around find-tag-default
@ 2005-02-14  4:31 Karl Chen
  2005-02-14 13:40 ` Stefan Monnier
  2005-02-15  6:15 ` Richard Stallman
  0 siblings, 2 replies; 7+ messages in thread
From: Karl Chen @ 2005-02-14  4:31 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-02-17 23:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-14  4:31 function-called-at-point: ignore-errors around find-tag-default Karl Chen
2005-02-14 13:40 ` 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

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.