]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-show-mark): Replace the last occurrence of
authorSam Steingold <sds@gnu.org>
Fri, 29 Oct 2004 14:31:34 +0000 (14:31 +0000)
committerSam Steingold <sds@gnu.org>
Fri, 29 Oct 2004 14:31:34 +0000 (14:31 +0000)
x-lost-selection-hooks with x-lost-selection-functions.

lisp/ChangeLog
lisp/mouse.el

index 43df724bb4c62008e6df9beddc7feb383d999816..764b5e77bb3a818cd009f60b2c3eef0e33e2f9f4 100644 (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
index 109613e8f58b54d9c357bc452746d4a05e4f572c..8f05324d84d6dec1e9e6014eebb213c107720d7f 100644 (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)