GNU bug report logs - #25063
26.0.50; Regression: parse-partial-sexp and syntax-ppss wrongly signal in-list

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Tue, 29 Nov 2016 17:56:02 UTC

Severity: normal

Tags: confirmed, fixed

Merged with 24870

Found in version 26.0.50

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #7 received at control <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 24870 <at> debbugs.gnu.org, Matt Armstrong <marmstrong <at> google.com>
Subject: Re: bug#24870: 26.0.50; parse-partial-sexp ignores comment-end
Date: Tue, 13 Dec 2016 22:00:16 -0500
[Message part 1 (text/plain, inline)]
tags 24870 = confirmed
merge 24870 25063
quit

This is the same as your report in 25063, as you noted there, the
comment starter is being counted as a list opener (although the comment
closer is not being recognized as a list closer).

Here's a recipe that doesn't require haskell-mode:

[bug-24870-comment-nesting-pps.el (text/plain, inline)]
(defconst 24870-syntax-table
  (let ((table (make-syntax-table)))
    (modify-syntax-entry ?\{  "(}1nb" table)
    (modify-syntax-entry ?\}  "){4nb" table)
    (modify-syntax-entry ?-  ". 123" table)
    table))

(defun 24870-test ()
  (interactive)
  (with-current-buffer (get-buffer-create "*24870 test*")
    (set-syntax-table 24870-syntax-table)
    (insert "{-C-}\nX")
    (message "pps nesting: %d" (nth 0 (parse-partial-sexp (point-min) (point-max))))
    (display-buffer (current-buffer))))
[Message part 3 (text/plain, inline)]
I have tracked the issue down to scan_sexps_forward in syntax.c

This bug report was last modified 8 years and 171 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.