>>>>> 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



_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to