--- Begin Message ---
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) |
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
--- End Message ---
--- Begin Message ---
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Stefan Monnier <address@hidden> 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.
--- End Message ---