GNU bug report logs -
#32504
[PATCH] syntax-is-{comment|string}-p
Previous Next
Reported by: Alex Branham <alex.branham <at> gmail.com>
Date: Wed, 22 Aug 2018 20:20:02 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Alex Branham <alex.branham <at> gmail.com> writes:
>>> Thanks, I didn't know about syntax-ppss-context. It doesn't seem to be
>>> documented anywhere.
>>
>> If it's useful, we could document it.
>
> I'm ambivalent about its usefulness - I don't see it used anywhere in
> Emacs's code and only once in the packages I have installed.
For a bit of prior art, there are some similar functions in python.el:
python-syntax-context, python-syntax-context-type,
python-syntax-comment-or-string-p, python-syntax-closing-paren-p.
Also, syntax.el has a couple of commented out "XEmacs compatibility
functions": buffer-syntactic-context, buffer-syntactic-context-depth.
I think it would make sense to provide symbolic names for all the
elements returned by syntax-ppss, maybe like this:
(cl-defstruct (syntax-state (:constructor nil)
(:type list))
depth list-start sexp-end
string-start comment quoted
min-depth comment-style comment-or-string-start
open-parens syntax-sequence)
This bug report was last modified 5 years and 313 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.