GNU bug report logs -
#11520
24.1.50; delete-selection-mode conflicts with electric-pair-mode
Previous Next
Reported by: Simon Law <sfllaw <at> sfllaw.ca>
Date: Sat, 19 May 2012 20:10:01 UTC
Severity: normal
Found in version 24.1.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #45 received at 11520 <at> debbugs.gnu.org (full text, mbox):
> I proposed making delete-selection-pre-hook understand a function as
> one of the legitimate types. If it were a function, it gets called and
> its results would be interpreted as type, either: 'yank, 'kill,
> 'supersede, t, or nil.
> That way, electric-pair-mode can override the (put
> 'self-insert-command 'delete-selection ...) with its own function that
That's going in the right direction, but I have two problems with that:
- I don't want electric-pair-mode to decide of the whole
self-insert-command behavior. I.e. self-insert-command should have
a `delete-selection' property that is not specific to
electric-pair-mode, so that if someone implements some other
post-self-insert-hook that also interacts with
selection-selection-mode, they should be able to cooperate.
IOW, we need self-insert-command's delete-section property to be a new
function that runs a new hook on which electric-foo-mode can add their
respective function.
- this new hook should be good enough for delete-selection-mode,
obviously, but it should also be good enough for a replacement
of delete-selection-mode that works differently.
I guess the functions on that hook would mostly need to return
a boolean indicating whether they're going to make use of the region.
Stefan
This bug report was last modified 10 years and 359 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.