bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16981: 24.3.50; electric-pair-delete-adjacent-pairs broken in c-mode


From: João Távora
Subject: bug#16981: 24.3.50; electric-pair-delete-adjacent-pairs broken in c-mode, python-mode, maybe-others
Date: Sun, 06 Apr 2014 02:51:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>>> There's something funny going on here.  A minor mode's keymap should
>> You're right, but I can't figure out what.
> That's because it's how remapping is works: first we lookup the key
> So the local-map and global-map's normal bindings take precedence over the
> minor-map's remapping.

Yeah that's it I remembered that this afternoon.

>   (define-key electric-pair-mode-map "\177"
>     `(menu-item "" electric-pair-delete-pair
>       :filter

>                   electric-pair-delete-adjacent-pairs)
>                 cmd))))))

Aha, the famed :filter trick I had heard about. Looks good enough while
we wait for that multiple-commands-per-keybinding refactoring. Not as
clean as remapping, but probably good enough, and it's arguable we want
this on any other key than backspace.

Hmmm now I remember that's it's even harder than defadvice to find the
extra code, docstring-wise I mean. How would a hacker discover we're
using the filter trick. describe-key doesn't help. .

Anyway should I install it? To emacs-24 only? I need a little help
VC-wise:

- I got two commits that are in trunk, r116926 and r116940, and should
be in (cherry-picked to?) emacs-24

- 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.

Is this correct? I also don't know much bzr to do this, especially the
first item. Is there a wiki as clear as BzrForEmacsDevs on this
particular workflow? I just did a "bzr switch emacs-24" from what I
believe to be a heavyweight checkout or something. It seems to have
worked.










reply via email to

[Prev in Thread] Current Thread [Next in Thread]