unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Alan Mackenzie <acm@muc.de>
Cc: 33840@debbugs.gnu.org
Subject: bug#33840: electric-pair-mode breaks self-insert-command
Date: Wed, 10 Jul 2019 00:39:00 +0200	[thread overview]
Message-ID: <87r26yq1dn.fsf@mouse.gnus.org> (raw)
In-Reply-To: <20181223023841.GA4289@ACM> (Alan Mackenzie's message of "Sun, 23 Dec 2018 02:38:41 +0000")

Alan Mackenzie <acm@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





  reply	other threads:[~2019-07-09 22:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-23  2:38 bug#33840: electric-pair-mode breaks self-insert-command Alan Mackenzie
2019-07-09 22:39 ` Lars Ingebrigtsen [this message]
2019-07-10  9:39   ` Alan Mackenzie
2019-07-10 11:34     ` Lars Ingebrigtsen
2019-07-10 17:08       ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r26yq1dn.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=33840@debbugs.gnu.org \
    --cc=acm@muc.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).