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

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

bug#32504: [PATCH] syntax-is-{comment|string}-p


From: Alex Branham
Subject: bug#32504: [PATCH] syntax-is-{comment|string}-p
Date: Thu, 30 Aug 2018 09:39:52 -0500
User-agent: mu4e 1.0; emacs 26.1

> I think it would make sense to provide symbolic names for all the
> elements returned by syntax-ppss, maybe like this:

That makes sense to me.

>     (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)

I'm not a big fan of the docstrings generated by this, is there a way to
change them to be more helpful? For example, syntax-state-comment looks
like this:

syntax-state-comment is a Lisp function.

(syntax-state-comment CL-X)

This function has a compiler macro ‘syntax-state-comment--cmacro’.

Access slot "comment" of ‘(syntax-state (:constructor nil) (:type list))’ 
struct CL-X.


But it would be a lot better (in my eyes, anyway) if it looked something
like this, had the -p suffix, and made CL-X default to point:

syntax-state-comment-p is a Lisp function.

(syntax-state-comment-p &optional CL-X)

This function has a compiler macro ‘syntax-state-comment-p--cmacro’.

Return non-nil if the syntax of CL-X is a comment. CL-X defaults to point.





reply via email to

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