[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16247: syntax-ppss returns incorrect state
From: |
Stefan Monnier |
Subject: |
bug#16247: syntax-ppss returns incorrect state |
Date: |
Fri, 03 Jan 2014 17:40:05 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> (
> (eval-when-compile
> | (let ((load-path
> (if (and (boundp 'byte-compile-dest-file)
[...]
> Why did the same buffer position change from depth 2 to depth 1, even
> though the buffer didn't change between the get-syntax calls?
That's because of syntax-begin-function, which in Lisp buffers assumes
than an open-paren in column 0 is necessarily outside of anything
(parens, comments, strings, ...). And then syntax-ppss sometimes uses
this assumption and sometimes not, depending on the distance of the
previous call to syntax-ppss and the nearest beginning of defun (aka
open-paren in column 0).
I just installed a change to leave syntax-begin-function nil in
Lisp buffers. The performance impact should be negligible.
Stefan
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#16247: syntax-ppss returns incorrect state,
Stefan Monnier <=