unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Karl Chen <quarl@NOSPAM.quarl.org>
Subject: Re: function-called-at-point: ignore-errors around find-tag-default
Date: Mon, 14 Feb 2005 11:06:58 -0800	[thread overview]
Message-ID: <quack.20050214T1106.87oeen2c6l@quack.cs.berkeley.edu> (raw)
In-Reply-To: 87wttbz2eo.fsf-monnier+emacs@gnu.org

>>>>> On 2005-02-14 05:40 PST, Stefan Monnier writes:

    >> In some modes (tex-mode), `find-tag-default' can misbehave
    >> and error.
    Stefan> To better judge which is the right thing to do, could
    Stefan> you describe what kind of misbehavior/error can happen
    Stefan> and in which circumstance?

Sure.  

Using `tex-mode' from textmodes/tex-mode.el (rather than from
AUCTeX):

(find-file "/tmp/a.tex")
(insert "\begin")
(find-tag-default)  ; on the same line as "\begin"

Error: scan-error; Data: (Containing expression ends prematurely 2 2)

This happens because tex-mode defines a function for
`forward-sexp-function' which looks for "\end".
`find-tag-default' assumes the regular forward-sexp function which
only considers single-character syntaxes (and thus would never
error if point is after \(\sw\|\s_\)+ )


-- 
Karl 2005-02-14 10:55

  reply	other threads:[~2005-02-14 19:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

  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=quack.20050214T1106.87oeen2c6l@quack.cs.berkeley.edu \
    --to=quarl@nospam.quarl.org \
    --cc=quarl+dated+1108839301.cf5f18@nospam.quarl.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).