GNU bug report logs - #78396
[PATCH] Add option for not highlight parens inside comments or strings.

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Mon, 12 May 2025 18:53:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


Message #32 received at 78396 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Elijah Gabe Pérez <eg642616 <at> gmail.com>
Cc: monnier <at> iro.umontreal.ca, 78396 <at> debbugs.gnu.org
Subject: Re: bug#78396: [PATCH] Add option for not highlight parens inside
 comments or strings.
Date: Sun, 01 Jun 2025 12:49:40 +0300
> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  78396 <at> debbugs.gnu.org
> Date: Sat, 31 May 2025 12:20:52 -0600
> 
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> 
> >> Thanks.
> >>
> >> Elijah, would you like to update your patch as suggested by Stefan
> >> above?
> >
> > Actually, I now see that the two calls can never happen at the same
> > time, so there's no change necessary.
> 
> Anyways I'm sending here an updated version of the patch with Eli's
> suggestions

Thanks, a few minor comments below:

> * lisp/paren.el (show-paren-not-in-comments-or-strings):
> New user option. (bug#78396)
                 ^^
Two spaces there, and "Bug" should be capitalized.

> (show-paren-function): Enclose code in `catch` function.
                                         ^^^^^^^
Please quote 'like this' in log messages.

> * doc/emacs/programs.texi: Document new option.

Please mention the node where you made the changes (in parentheses, as
if it were a function).

> +@item
> +@vindex show-paren-not-in-comments-or-strings
> +If the value of @code{show-paren-not-in-comments-or-strings} is
> +@code{all}, delimiters inside comments and strings will not be
> +highlighted.  Otherwise if the value is set to @code{on-mismatch}, the
> +delimiters mismatched inside comments will not be highlighted.
   ^^^^^^^^^^^^^^^^^^^^^
"mismatched delimiters", i.e. reverse the order.

> +** New user option 'show-paren-not-in-comments-or-strings'
> +This option tells show-paren not to highlight the paren that are inside
                                                     ^^^^^
"parens", plural.  Also, this is not only about parentheses, right?

> +a comment or string.  If set to 'all', do not highlight the paren that
                                                               ^^^^^
"parens"

> +are inside comments or strings.  If set to 'on-mismatch', the paren
                                                                 ^^^^^
And here.

> +mismatched inside comments will not be highlighted.  If set to nil (by
> +default), highlight the paren wherever it is.                      ^^^
   ^^^^^^^^
We say "(the default)".  Also, "highlight the parens wherever they
are", in plural again.

Thanks.




This bug report was last modified 10 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.