+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
(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)))
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)