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

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

bug#24434: [25.1.1] parse-partial-sexp: opening delimiter missed


From: npostavs
Subject: bug#24434: [25.1.1] parse-partial-sexp: opening delimiter missed
Date: Thu, 15 Sep 2016 08:50:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

tags 24434 = notabug
close 24434
quit

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

>>>
>>> When outside a string, `{' is recognized as opener.
>> I think this is correct, parse-partial-sexp detects whether it's in a
>> string-literal or not. If you want to parse the contents of the string
>> literal, FROM should be inside the literal.
>
> Thanks. This works for me:
>
> (defun in-string-interpolation-maybe ()
>   (let ((pps (parse-partial-sexp (point-min) (point))))
>     (and (nth 3 pps) (nth 3 (parse-partial-sexp (1+ (nth 8 pps))
> (point))))))

Okay, looks like everything is functioning as expected, closing.





reply via email to

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