forked from mirrors/org-mode
Fix bug when using both electric-pair-mode and delete-selection-mode
* org.el (org-self-insert-command) (orgtbl-self-insert-command): Change the value of the `delete-selection' property to allow other commands like `electric-pair-will-use-region' to be run before deletion. Thanks to Harald Hanche-Olsen for reporting this.
This commit is contained in:
parent
ba20e937ae
commit
7fe99af695
10
lisp/org.el
10
lisp/org.el
|
@ -19489,8 +19489,14 @@ because, in this case the deletion might narrow the column."
|
|||
(org-fix-tags-on-the-fly))))
|
||||
|
||||
;; Make `delete-selection-mode' work with org-mode and orgtbl-mode
|
||||
(put 'org-self-insert-command 'delete-selection t)
|
||||
(put 'orgtbl-self-insert-command 'delete-selection t)
|
||||
(put 'org-self-insert-command 'delete-selection
|
||||
(lambda ()
|
||||
(not (run-hook-with-args-until-success
|
||||
'self-insert-uses-region-functions))))
|
||||
(put 'orgtbl-self-insert-command 'delete-selection
|
||||
(lambda ()
|
||||
(not (run-hook-with-args-until-success
|
||||
'self-insert-uses-region-functions))))
|
||||
(put 'org-delete-char 'delete-selection 'supersede)
|
||||
(put 'org-delete-backward-char 'delete-selection 'supersede)
|
||||
(put 'org-yank 'delete-selection 'yank)
|
||||
|
|
Loading…
Reference in a new issue