Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick fix of #75 #80

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Quick fix of #75 #80

wants to merge 3 commits into from

Conversation

yuhan0
Copy link

@yuhan0 yuhan0 commented Aug 26, 2020

This PR drops an obsolete workaround for remapping keys and fixes #75 by wrapping the offending code in a (when outshine-use-speed-commands ) block.

The consequence of this is that outshine-use-speed-commands (nil by default) has to be enabled before the package is loaded, and changing it afterwards does not have any effect.

- Removes the redundant `outshine-defkey` and `outshine-remap` functions since
  the command-remapping functionality has been available from Emacs 22.
- Move remapping of self-insert-command to the Key bindings section
The original appears to be taken org-self-insert-command and left unchanged by
mistake.
The only purpose of remapping self-insert-command for speed commands, so
do not remap at all if `outshine-use-speed-commands' is nil.

The remapping breaks compatibilty with multiple-cursors and potentially other
modes which depend on self-insert-command.
@alphapapa
Copy link
Owner

Thanks. However, the consequence you mention is an important one. The idiomatic way to fix this would be to define an outshine-speed-commands-mode minor mode.

@yuhan0
Copy link
Author

yuhan0 commented Aug 27, 2020

I'm aware of this, which is why it's labeled a "quick fix". Feel free to only merge the first 2 commits or implement the additional minor mode afterwards, or just leave this here for others to reference in their own forks.

The current code as I recall is incompatible with multiple-cursors and other packages which rely on self-insert-command.

Note that other packages like Evil and outline-minor mode itself also have similar caveats with vars that must be set before package load.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any way to not enable outshine keybindings?
2 participants