diff options
author | Sam Steingold <[email protected]> | 2004-10-29 14:31:34 +0000 |
---|---|---|
committer | Sam Steingold <[email protected]> | 2004-10-29 14:31:34 +0000 |
commit | ab60bd74039853d94fd4b9715724af9444879b93 (patch) | |
tree | 6f1bfab1d30c4686d88e94049f6defe7acf5d4e7 /lisp/mouse.el | |
parent | 5153a47a757485b2b6260b2e920da340358d1c1b (diff) |
(mouse-show-mark): Replace the last occurrence of
x-lost-selection-hooks with x-lost-selection-functions.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r-- | lisp/mouse.el | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 109613e8f5..8f05324d84 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -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) |