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

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

bug#30502: 26.0.91; electric-pair-mode documentation


From: Charles A. Roelli
Subject: bug#30502: 26.0.91; electric-pair-mode documentation
Date: Sat, 17 Feb 2018 17:51:45 +0100

> Date: Sat, 17 Feb 2018 18:21:16 +0200
> From: Eli Zaretskii <address@hidden>
> CC: address@hidden
> Reply-to: Eli Zaretskii <address@hidden>
> 
> > Date: Sat, 17 Feb 2018 17:07:53 +0100
> > From: address@hidden (Charles A. Roelli)
> > 
> > When you turn on electric-pair-mode from emacs -q, then select a
> > region and type an opening delimeter like "(", the region is
> > surrounded by the "(" and ")" characters, the mark is deactivated, and
> > point is left after the opening delimeter.  This should be documented.
> > (I searched for documentation but have not found any.)
> 
> Which part of this is undocumented?  Did you see the description of
> Electric pair mode in the "Matching" node of the user manual?

Yes, I did.  The node does not mention anything about automatically
inserting a matching delimeter at the mark when the region is active
and a delimeter character is typed.  For example, it could say,

Whenever you insert an opening delimiter, the matching closing
delimiter is automatically inserted as well (at the mark, if the
region is active), leaving point between the two.

instead of,

Whenever you insert an opening delimiter, the matching closing
delimiter is automatically inserted as well, leaving point between the
two.

> > Also, this functionality requires transient-mark-mode to be on.
> 
> I don't see it.  I can turn off transient-mark-mode, and the feature
> still works.  Maybe I don't understand what you mean by "this
> functionality"?

By "this functionality" I mean auto-inserting a matching delimeter at
the mark when a delimeter character is typed, when electric-pair-mode
is on.  The region has to be active for this to work, therefore
transient-mark-mode must be on (even if temporarily).  I suggest
adding a command that wraps point and mark with some given delimeters,
regardless of whether the region is active.





reply via email to

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