comparison lisp/prim/mouse.el @ 104:cf808b4c4290 r20-1b4

Import from CVS: tag r20-1b4
author cvs
date Mon, 13 Aug 2007 09:16:51 +0200
parents 54cc21c15cbb
children fe104dbd9147
comparison
equal deleted inserted replaced
103:30eda07fe280 104:cf808b4c4290
1034 1034
1035 (defun default-mouse-track-down-hook (event click-count) 1035 (defun default-mouse-track-down-hook (event click-count)
1036 (setq default-mouse-track-down-event (copy-event event)) 1036 (setq default-mouse-track-down-event (copy-event event))
1037 nil) 1037 nil)
1038 1038
1039 (defun default-mouse-track-cleanup-hook () 1039 (defun default-mouse-track-cleanup-extents-hook ()
1040 (remove-hook 'pre-command-hook 'default-mouse-track-cleanup-extents-hook)
1040 (let ((extent default-mouse-track-extent)) 1041 (let ((extent default-mouse-track-extent))
1041 (if (consp extent) ; rectangle-p 1042 (if (consp extent) ; rectangle-p
1042 (mapcar 'delete-extent extent) 1043 (mapcar 'delete-extent extent)
1043 (if extent 1044 (if extent
1044 (delete-extent extent))))) 1045 (delete-extent extent)))))
1046
1047 (defun default-mouse-track-cleanup-hook ()
1048 (if zmacs-regions
1049 (funcall 'default-mouse-track-cleanup-extents-hook)
1050 (let ((extent default-mouse-track-extent)
1051 (func #'(lambda (e) (set-extent-face e 'primary-selection))))
1052 (add-hook 'pre-command-hook 'default-mouse-track-cleanup-extents-hook)
1053 (if (consp extent) ; rectangle-p
1054 (mapcar func extent)
1055 (if extent
1056 (funcall func extent))))))
1045 1057
1046 (defun default-mouse-track-cleanup-extent () 1058 (defun default-mouse-track-cleanup-extent ()
1047 (let ((dead-func 1059 (let ((dead-func
1048 (function (lambda (x) 1060 (function (lambda (x)
1049 (or (not (extent-live-p x)) 1061 (or (not (extent-live-p x))