--- Begin Message ---
Subject: |
syntax-ppss returns wrong result. |
Date: |
Fri, 11 Mar 2016 15:15:12 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
Hello, Emacs.
The fundamental contract in syntax-ppss is that (syntax-ppss POS)
returns the same value as (parse-partial-sexp (point-min) POS) (with the
exception of elements 2 and 6). This is currently not always the case.
In the master branch, emacs -Q and visit xdisp.c with C-x C-f. Follow
this recipe:
M-: (syntax-ppss-flush-cache 1)
M-: (setq ppss-0 (syntax-ppss 40000))
M-<
C-s #include " <CR>
M->
C-x n n
M-: (setq ppss-1 (syntax-ppss 40000))
M-: (setq parse (parse-partial-sexp (point-min) 40000))
At this point, `ppss-1' and `parse' should match (apart from elements 2
and 6). What we actually have is:
ppss-1: (2 39992 nil nil nil nil 2 nil nil (39975 39992))
parse: (0 nil 15674 34 nil nil 0 nil 15675 nil)
.
--
Alan Mackenzie (Nuremberg, Germany).
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#22983: syntax-ppss returns wrong result. |
Date: |
1 Oct 2017 16:31:03 -0000 |
User-agent: |
tin/2.4.1-20161224 ("Daill") (UNIX) (FreeBSD/11.0-RELEASE-p2 (amd64)) |
The bug has been fixed by patches to the emacs-26 branch.
--
Alan Mackenzie (Nuremberg, Germany).
--- End Message ---