GNU bug report logs -
#78053
[PATCH] Support strings for electric-pairs.
Previous Next
Full log
View this message in rfc822 format
> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 78053 <at> debbugs.gnu.org,
> joaotavora <at> gmail.com
> Date: Sun, 08 Jun 2025 12:24:57 -0600
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > Is the last patch okay to install? If not, Elijah, would you please
> > submit an updated patch?
>
> Sure, I'm sending here a better version.
>
> I made a few minor changes since I found several bugs.
> If there are no objections, the patch is ready to be installed.
Thanks, a few further minor comments:
> +---
> +** Electric pair mode now supports multi-character paired delimiters.
> +This is done by supporting strings in electric-pair-pairs.
the last sentence should be rewritten to tell users how to use this
feature instead of how it was implemented. For example:
To use this, customize 'electric-pair-pairs' to include the
delimiter strings.
(Note that this also quotes symbols, like we do in NEWS.)
> See also the variable `electric-pair-text-pairs'."
> :version "24.1"
> :group 'electricity
> - :type '(repeat (cons character character)))
> + :type '(repeat
> + (choice (cons :tag "Characters" character character)
> + (cons :tag "Strings" string string)
> + (list :tag "Strings and insert space in pairs"
> + string string boolean))))
What does "Strings and insert space in pairs" mean? This tag is IMO
unclear, and we should clarify it.
> @@ -51,10 +57,16 @@ electric-pair-text-pairs
>
> Pairs of delimiters in this list are a fallback in case they have
> no syntax relevant to `electric-pair-mode' in the syntax table
> -defined in `electric-pair-text-syntax-table'."
> +defined in `electric-pair-text-syntax-table'.
> +
> +NOTE: In string pairs, the first pair is a regular expression."
> :version "24.4"
> :group 'electricity
> - :type '(repeat (cons character character)))
> + :type '(repeat
> + (choice (cons :tag "Characters" character character)
> + (cons :tag "Strings" string string)
> + (list :tag "Strings and insert space in pairs"
> + string string boolean))))
Likewise here.
This bug report was last modified 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.