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

devil-mode seems ignores delete-selection-mode #11

Open
3ncor opened this issue Jun 17, 2023 · 1 comment
Open

devil-mode seems ignores delete-selection-mode #11

3ncor opened this issue Jun 17, 2023 · 1 comment

Comments

@3ncor
Copy link

3ncor commented Jun 17, 2023

After delete-selection-mode turned on, C-y will replace the active region with yanked text, but , y still behave like delete-selection-mode is not active, , y till just insert yanked text at cursor position.

fbrosda added a commit to fbrosda/devil that referenced this issue Nov 20, 2024
@fbrosda
Copy link

fbrosda commented Nov 20, 2024

Stumbled over this, too. Seems to be similar to what is described in this old thread: https://mail.gnu.org/archive/html/help-gnu-emacs/2008-10/msg00402.html

The problem here is that the pre-command-hook, which is used for delete-selection-mode, isn't fired at all if a command is executed via M-x or call-interactively as used by devil.

Calling the delete-selection-pre-hook explicitly just before invoking the command seems to work. I'm honestly not sure, why exactly this-command is already set to the right value at that point, but as long as I don't find any problems, I'm using it.

Happy to create a pull request if someone else confirms, that this is a safe thing to do. s.a. fbrosda@73e5fc1

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

No branches or pull requests

2 participants