[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32504: [PATCH] syntax-is-{comment|string}-p
From: |
Noam Postavsky |
Subject: |
bug#32504: [PATCH] syntax-is-{comment|string}-p |
Date: |
Fri, 24 Aug 2018 22:26:51 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Alex Branham <alex.branham@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)
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Alex Branham, 2018/08/22
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Noam Postavsky, 2018/08/22
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Alex Branham, 2018/08/23
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Eli Zaretskii, 2018/08/23
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Alex Branham, 2018/08/24
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Eli Zaretskii, 2018/08/24
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Alex Branham, 2018/08/24
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Andreas Röhler, 2018/08/26
- bug#32504: [PATCH] syntax-is-{comment|string}-p,
Noam Postavsky <=
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Alex Branham, 2018/08/30
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Noam Postavsky, 2018/08/30
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Alex Branham, 2018/08/30
- bug#32504: [PATCH] syntax-is-{comment|string}-p, Phil Sainty, 2018/08/23