GNU bug report logs - #79047
Add some multi-character pairs to some major modes.

Previous Next

Package: emacs;

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

Date: Sat, 19 Jul 2025 02:05:02 UTC

Severity: normal

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

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 79047 <at> debbugs.gnu.org, acm <at> muc.de, Eli Zaretskii <eliz <at> gnu.org>, jm <at> pub.pink, eg642616 <at> gmail.com
Subject: bug#79047: Add some multi-character pairs to some major modes.
Date: Thu, 24 Jul 2025 18:47:24 +0000
Hello, Stefan.

Thanks for your reply.

Sadly you snipped the key section of my last post.  Here it is again:

> > But electric pair mode's implementation violates an (unwritten) Emacs
> > convention about hooks, i.e. that a hook function doesn't mess with
> > the functionality that invoked it.  For example, a function in
> > window-scroll-functions may not change the scrolling state of a
> > window, and an after-change-functions function never changes the text
> > of a buffer.

> > By contrast, electric-pair-post-self-insert-function does mess with
> > the invoking functionality, namely self-insert-command; it inserts
> > further characters.  From the point of view of a Lisp program, this
> > makes self-insert-function an undefined function - what it does
> > varies from time to time and from buffer to buffer.

As you're aware, when faced with a problem, I tend to analyse the cause
at the appropriately abstract level, and then fix that cause, rather than
just paper over the problem with some unsatisfactory workaround.

The fundamental cause of this problem with electric pair mode is, I
believe, in my two quoted paragraphs above.  I ask you to answer the
points made in these two paragraphs.

Thanks!

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 1 day ago.

Previous Next


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