mediawiki-el
mediawiki-el copied to clipboard
Stomps all over the local keymap if outline-minor-mode is enabled (or disabled)
(add-hook 'outline-minor-mode-hook 'mediawiki-outline-magic-keys)
is really bad.
mediawiki-outline-magic-keys
calls local-set-key
for a bunch of key sequences. That's usually the major mode keymap, which is shared amongst all buffers in that mode whether or not outline-minor-mode
(let alone mediawiki-mode
) is enabled in any given buffer, and which persists for future buffers using that major mode as well.
And because the global outline-minor-mode-hook
was used, this clobbering happens again in future, even if you'd re-bound the keys manually, until you figure out what was causing it.
And this all happens from simply loading mediawiki.el.
I suggest creating a new buffer-local minor mode for the desired key bindings, and then only enabling that mode in the specific buffers where you want it.
Excellent points. I'll look at fixing this soon.
Could you see if this is fixed in the latest master?
No, the current master is commit 05aab5ce3b4708dd12e6e33dfab390a9c19dcabf and we can see that nothing has changed: https://github.com/hexmode/mediawiki-el/blob/05aab5ce3b4708dd12e6e33dfab390a9c19dcabf/mediawiki.el#L1917-L1932
ah, thanks for showing me.
Ouch, this is really bad. It just bit me by breaking outshine-mode
, and confused the hell out of me until I traced it to this package. I suggest simply removing that add-hook
line as a quick fix, but yeah, these keys absolutely must be moved to their own map. In the mean time I'm going to have to uninstall this package unfortunately.