GNU bug report logs - #50236
27.2; electric-pair-mode is inconvenient in comint

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Sat, 28 Aug 2021 10:18:01 UTC

Severity: normal

Found in version 27.2

Full log


Message #11 received at 50236 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 50236 <at> debbugs.gnu.org
Subject: Re: bug#50236: 27.2; electric-pair-mode is inconvenient in comint
Date: Mon, 22 Aug 2022 17:37:27 +0200
Augusto Stoffel <arstoffel <at> gmail.com> writes:

> The following quick fix works for me:
>
>     (defun electric-pair-skip-in-field (char)
>       (save-restriction
>         (narrow-to-region (field-beginning) (field-end))
>         (electric-pair-default-skip-self char)))
>
>     (add-hook 'comint-mode-hook (lambda () (setq-local electric-pair-skip-self
>                                                        'electric-pair-skip-in-field)))
>
> Perhaps `electric-pair-default-skip-self' should always narrow to the
> current field?

That would make sense in this case...  I'm trying to think of instances
where it wouldn't make sense, and I can't think of any.

So perhaps we should make this change in general?

Anybody have any opinions here?




This bug report was last modified 2 years and 267 days ago.

Previous Next


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