GNU bug report logs - #33840
electric-pair-mode breaks self-insert-command

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Sun, 23 Dec 2018 02:46:01 UTC

Severity: normal

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 33840 <at> debbugs.gnu.org
Subject: bug#33840: electric-pair-mode breaks self-insert-command
Date: Wed, 10 Jul 2019 00:39:00 +0200
Alan Mackenzie <acm <at> muc.de> writes:

> In the master branch, put the following into *scratch* and evaluate it:
>
>     (defun s-i-c ()
>       (interactive)
>       (self-insert-command 1))
>     (local-set-key "(" 's-i-c))
>
> On typing "(", it will be seen that the self-insert-command does its
> job, correctly entering "(" into *scratch*.
>
> Now do M-x electric-pair-mode.
>
> If you now type "(", self-insert-command wrongly enters "()" into the
> buffer.  This is a bug, and is the root cause of bug #33794.

I must be misunderstanding something -- isn't the entire point of
electric-pair-mode that it inserts the corresponding parenthesis when
self-insert-command is called on one of the magical characters?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 315 days ago.

Previous Next


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