GNU bug report logs - #16981
24.3.50; electric-pair-delete-adjacent-pairs broken in c-mode, python-mode, maybe-others

Previous Next

Package: emacs;

Reported by: joaotavora <at> gmail.com (João Távora)

Date: Mon, 10 Mar 2014 19:49:01 UTC

Severity: normal

Found in version 24.3.50

Done: joaotavora <at> gmail.com (João Távora)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: joaotavora <at> gmail.com (João Távora)
Cc: tracker <at> debbugs.gnu.org
Subject: bug#16981: closed (24.3.50; electric-pair-delete-adjacent-pairs
 broken in c-mode, python-mode, maybe-others)
Date: Mon, 07 Apr 2014 00:05:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 07 Apr 2014 01:04:35 +0100
with message-id <87zjjyovho.fsf <at> kitaj.lan>
and subject line Re: bug#16981: 24.3.50; electric-pair-delete-adjacent-pairs broken in c-mode, python-mode,	maybe-others
has caused the debbugs.gnu.org bug report #16981,
regarding 24.3.50; electric-pair-delete-adjacent-pairs broken in c-mode, python-mode, maybe-others
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
16981: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16981
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: joaotavora <at> gmail.com (João Távora)
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50;
 electric-pair-delete-adjacent-pairs broken in c-mode, python-mode,
 maybe-others
Date: Mon, 10 Mar 2014 19:47:39 +0000
This variable, t by default, acts when `electric-pair-mode' is enabled.

It doesn't work in c-mode, python-mode and maybe other modes in
emacs. In also doesn't work in other modes outside of emacs, such as
markdown-mode.el [1]

All these modes rebind the backspace key to a command that does some
mode-specific action, then calls `backward-delete-char-untabify'.

elec-pair.el does mostly the same through remapping in its
`electric-pair-mode-map' but this binding is overriden by the
major-mode's.

elec-pair.el remaps two other commands similarly. Here's the value of
electric-pair-mode-map

    (keymap
     (remap keymap
            (delete-backward-char . electric-pair-backward-delete-char)
            (backward-delete-char . electric-pair-backward-delete-char)
            (backward-delete-char-untabify
               . electric-pair-backward-delete-char-untabify)))


Perhaps a hook in `backward-delete-char' is in order. Or the other major
modes can find other ways to overload the backspace key.

Thanks,
João

[1]: http://jblevins.org/git/markdown-mode.git/plain/markdown-mode.el




[Message part 3 (message/rfc822, inline)]
From: joaotavora <at> gmail.com (João Távora)
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 16981-done <at> debbugs.gnu.org, 17192-done <at> debbugs.gnu.org,
 17183-done <at> debbugs.gnu.org, Alan Mackenzie <acm <at> muc.de>
Subject: Re: bug#16981: 24.3.50;
 electric-pair-delete-adjacent-pairs broken in c-mode,
 python-mode,	maybe-others
Date: Mon, 07 Apr 2014 01:04:35 +0100
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

> Just take the corresponding diffs (IIRC you can use
> "bzr merge -r116925..r116926 .../trunk" for that) and commit them into
> emacs-24.
>
> Bzr doesn't really know about cherry picking, but if you put
> "backported" into your commit message, our bzrmerge.el script
> will know that this commit is already in the trunk and will know how to
> avoid the corresponding conflicts when merging emacs-24 back into trunk.
>
>> - Three different fixes (bugs 16981,17192 and 17183) not yet pushed that
>> I think you want me to only push to emacs-24, since that will be merged
>> back to trunk later.
>
> Right.

These three I did successfully, but failed miserably in the
backporting. Oh git where art thou... Now I'm downloading a new repo
(with sharing properly setup hopefully), since I must have done
something that messed up my bzr conf, apparently I shouldn't have moved
my repo dir.

Should be done tomorrow morning, so I'll backport r116926 and r116940
then.


This bug report was last modified 11 years and 47 days ago.

Previous Next


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