[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/mouse.el [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/mouse.el [emacs-unicode-2] |
Date: |
Thu, 04 Nov 2004 04:03:12 -0500 |
Index: emacs/lisp/mouse.el
diff -c emacs/lisp/mouse.el:1.241.8.4 emacs/lisp/mouse.el:1.241.8.5
*** emacs/lisp/mouse.el:1.241.8.4 Fri Oct 22 10:13:29 2004
--- emacs/lisp/mouse.el Thu Nov 4 08:55:37 2004
***************
*** 1025,1078 ****
"List of keys which shall cause the mouse region to be deleted.")
(defun mouse-show-mark ()
! (if transient-mark-mode
! (delete-overlay mouse-drag-overlay)
! (let ((inhibit-quit t)
! (echo-keystrokes 0)
! event events key ignore
! x-lost-selection-hooks)
! (add-hook 'x-lost-selection-hooks
! (lambda (seltype)
! (if (eq seltype 'PRIMARY)
! (progn (setq ignore t)
! (throw 'mouse-show-mark t)))))
! (move-overlay mouse-drag-overlay (point) (mark t))
! (catch 'mouse-show-mark
! ;; In this loop, execute scroll bar and switch-frame events.
! ;; Also ignore down-events that are undefined.
! (while (progn (setq event (read-event))
! (setq events (append events (list event)))
! (setq key (apply 'vector events))
! (or (and (consp event)
! (eq (car event) 'switch-frame))
! (and (consp event)
! (eq (posn-point (event-end event))
! 'vertical-scroll-bar))
! (and (memq 'down (event-modifiers event))
! (not (key-binding key))
! (not (mouse-undouble-last-event events))
! (not (member key mouse-region-delete-keys)))))
! (and (consp event)
! (or (eq (car event) 'switch-frame)
! (eq (posn-point (event-end event))
! 'vertical-scroll-bar))
! (let ((keys (vector 'vertical-scroll-bar event)))
! (and (key-binding keys)
! (progn
! (call-interactively (key-binding keys)
! nil keys)
! (setq events nil)))))))
! ;; If we lost the selection, just turn off the highlighting.
! (if ignore
! nil
! ;; For certain special keys, delete the region.
! (if (member key mouse-region-delete-keys)
! (delete-region (overlay-start mouse-drag-overlay)
! (overlay-end mouse-drag-overlay))
! ;; Otherwise, unread the key so it gets executed normally.
! (setq unread-command-events
! (nconc events unread-command-events))))
! (setq quit-flag nil)
(delete-overlay mouse-drag-overlay))))
(defun mouse-set-mark (click)
--- 1025,1080 ----
"List of keys which shall cause the mouse region to be deleted.")
(defun mouse-show-mark ()
! (let ((inhibit-quit t)
! (echo-keystrokes 0)
! event events key ignore
! (x-lost-selection-functions
! (when (boundp 'x-lost-selection-functions)
! (copy-sequence x-lost-selection-functions))))
! (add-hook 'x-lost-selection-functions
! (lambda (seltype)
! (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)))
! (catch 'mouse-show-mark
! ;; In this loop, execute scroll bar and switch-frame events.
! ;; Also ignore down-events that are undefined.
! (while (progn (setq event (read-event))
! (setq events (append events (list event)))
! (setq key (apply 'vector events))
! (or (and (consp event)
! (eq (car event) 'switch-frame))
! (and (consp event)
! (eq (posn-point (event-end event))
! 'vertical-scroll-bar))
! (and (memq 'down (event-modifiers event))
! (not (key-binding key))
! (not (mouse-undouble-last-event events))
! (not (member key mouse-region-delete-keys)))))
! (and (consp event)
! (or (eq (car event) 'switch-frame)
! (eq (posn-point (event-end event))
! 'vertical-scroll-bar))
! (let ((keys (vector 'vertical-scroll-bar event)))
! (and (key-binding keys)
! (progn
! (call-interactively (key-binding keys)
! nil keys)
! (setq events nil)))))))
! ;; If we lost the selection, just turn off the highlighting.
! (unless ignore
! ;; For certain special keys, delete the region.
! (if (member key mouse-region-delete-keys)
! (delete-region (overlay-start mouse-drag-overlay)
! (overlay-end mouse-drag-overlay))
! ;; Otherwise, unread the key so it gets executed normally.
! (setq unread-command-events
! (nconc events unread-command-events))))
! (setq quit-flag nil)
! (unless transient-mark-mode
(delete-overlay mouse-drag-overlay))))
(defun mouse-set-mark (click)
***************
*** 1110,1116 ****
Prefix arguments are interpreted as with \\[yank].
If `mouse-yank-at-point' is non-nil, insert at point
regardless of where you click."
! (interactive "*e\nP")
;; Give temporary modes such as isearch a chance to turn off.
(run-hooks 'mouse-leave-buffer-hook)
(or mouse-yank-at-point (mouse-set-point click))
--- 1112,1118 ----
Prefix arguments are interpreted as with \\[yank].
If `mouse-yank-at-point' is non-nil, insert at point
regardless of where you click."
! (interactive "e\nP")
;; Give temporary modes such as isearch a chance to turn off.
(run-hooks 'mouse-leave-buffer-hook)
(or mouse-yank-at-point (mouse-set-point click))
***************
*** 1412,1418 ****
Move point to the end of the inserted text.
If `mouse-yank-at-point' is non-nil, insert at point
regardless of where you click."
! (interactive "*e")
;; Give temporary modes such as isearch a chance to turn off.
(run-hooks 'mouse-leave-buffer-hook)
(or mouse-yank-at-point (mouse-set-point click))
--- 1414,1420 ----
Move point to the end of the inserted text.
If `mouse-yank-at-point' is non-nil, insert at point
regardless of where you click."
! (interactive "e")
;; Give temporary modes such as isearch a chance to turn off.
(run-hooks 'mouse-leave-buffer-hook)
(or mouse-yank-at-point (mouse-set-point click))
- [Emacs-diffs] Changes to emacs/lisp/mouse.el [emacs-unicode-2],
Miles Bader <=