[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: function-called-at-point: ignore-errors around find-tag-default
From: |
Karl Chen |
Subject: |
Re: function-called-at-point: ignore-errors around find-tag-default |
Date: |
Mon, 14 Feb 2005 11:06:58 -0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>>>>> 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