On 13.10.2016 10:50, Tino Calancha wrote:
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
beg still needs a check like
(not (nth 8 (parse-partial-sexp (point-min) (point))))
otherwise it could match inside a string or comment
I have the feeling that this should return the local list
at point, even if inside a string or comment.
Yes, but that would be reported by pps. However, when point is at
opening delimiter, this is not recognised by pps. Then we must be sure
not being inside a string or comment, where an opening delimiter is
meaningless, i.e. just a literal.
IMO all needed is something like
(beg (or (nth 1 (parse-partial-sexp...))
(and (eq 4 (car (syntax-after (point))))
(not (nth 8 (parse-partial-sexp...))
(point)))))
Should both fail, there is not list at point.