1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-01 20:06:00 +00:00

(mouse-show-mark): Replace the last occurrence of

x-lost-selection-hooks with x-lost-selection-functions.
This commit is contained in:
Sam Steingold 2004-10-29 14:31:34 +00:00
parent 5153a47a75
commit ab60bd7403
2 changed files with 12 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2004-10-29 Sam Steingold <sds@gnu.org>
* mouse.el (mouse-show-mark): Repleace the last occurrence of
x-lost-selection-hooks with x-lost-selection-functions.
2004-10-28 Stefan <monnier@iro.umontreal.ca>
* mouse.el (mouse-show-mark): Adjust to new name and don't assume

View File

@ -1029,13 +1029,13 @@ If MODE is 2 then do the same for lines."
(echo-keystrokes 0)
event events key ignore
(x-lost-selection-functions
(if (boundp 'x-lost-selection-functions)
(copy-sequence x-lost-selection-functions))))
(add-hook 'x-lost-selection-hook
(when (boundp 'x-lost-selection-functions)
(copy-sequence x-lost-selection-functions))))
(add-hook 'x-lost-selection-functions
(lambda (seltype)
(if (eq seltype 'PRIMARY)
(progn (setq ignore t)
(throw 'mouse-show-mark t)))))
(when (eq seltype 'PRIMARY)
(setq ignore t)
(throw 'mouse-show-mark t))))
(if transient-mark-mode
(delete-overlay mouse-drag-overlay)
(move-overlay mouse-drag-overlay (point) (mark t)))
@ -1065,8 +1065,7 @@ If MODE is 2 then do the same for lines."
nil keys)
(setq events nil)))))))
;; If we lost the selection, just turn off the highlighting.
(if ignore
nil
(unless ignore
;; For certain special keys, delete the region.
(if (member key mouse-region-delete-keys)
(delete-region (overlay-start mouse-drag-overlay)