bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21343: 24.5; parse-partial-sexp mistakes string for a comment


From: Oleh Krehel
Subject: bug#21343: 24.5; parse-partial-sexp mistakes string for a comment
Date: Wed, 26 Aug 2015 13:27:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> Am 25.08.2015 um 15:11 schrieb Oleh Krehel:
>> To reproduce, paste this code into *scratch*, "|" is the point:
>>
>> ("|foo"
>>   ";; (bar)")
>>
>> M-x indent-sexp will result in "    ;" being inserted after the sexp.
>>
>> This is because `parse-partial-sexp' for the second line detects a
>> comment at one stage.

> Can't reproduce with GNU Emacs 25.0.50.1 (i686-pc-linux-gnu, GTK+
> Version 2.24.23) of 2015-08-10
>
> TAB indents nicely both lines, detects inside string when cursor at
> bar.

This is reproducible with "emacs -Q" on both 25 and 24.5.2.  You need to
not press "TAB", but "M-x indent-sexp" from the specified point
position.

`parse-partial-sexp' will detect comment on line 2 only when called in a
sequence that `indent-sexp' calls it, i.e. with the previous pps data
passed to the second pps call.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]