]> git.eshelyaron.com Git - emacs.git/commit
Improve behavior of `lost-selection-mode' with multiple buffers
authorPo Lu <luangruo@yahoo.com>
Mon, 11 Jul 2022 11:36:01 +0000 (19:36 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 11 Jul 2022 11:36:12 +0000 (19:36 +0800)
commit6f57fb71a50a8b2ac8163828a2cecb394bb52d06
tree02cbe006bbd8ec919f6bf3ed32a1fbd1d23048ac
parent2f823ffd28d064fc8c1a3947e74c512b577863c6
Improve behavior of `lost-selection-mode' with multiple buffers

* etc/NEWS: Announce new hook `post-select-region-hook'.

* lisp/select.el (lost-selection-last-region-buffer): New
variable.
(lost-selection-post-select-region-function): New function.
Deactivate the mark if the buffer changed.
(lost-selection-mode): Add new hook.

* src/keyboard.c (command_loop_1): Run that hook when
appropriate.
(syms_of_keyboard): New hook `post-select-region-hook'.
etc/NEWS
lisp/select.el
src/keyboard.c