[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105138: Adapt Mouse Sel mode to Emac
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105138: Adapt Mouse Sel mode to Emacs 24 mouse code. |
Date: |
Tue, 12 Jul 2011 14:59:48 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105138
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Tue 2011-07-12 14:59:48 -0400
message:
Adapt Mouse Sel mode to Emacs 24 mouse code.
* lisp/mouse-sel.el: Hack restoring functionality, while keeping
compatibility with 2010-07-03 changes to mouse selection.
(mouse-sel-primary-overlay): New var.
(mouse-sel-selection-alist): Use it.
(mouse-sel-mode): Doc fix; remove points that are default features
of mouse.el.
modified:
lisp/ChangeLog
lisp/mouse-sel.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-07-12 14:40:56 +0000
+++ b/lisp/ChangeLog 2011-07-12 18:59:48 +0000
@@ -1,3 +1,12 @@
+2011-07-12 Chong Yidong <address@hidden>
+
+ * mouse-sel.el: Hack restoring functionality, while keeping
+ compatibility with 2010-07-03 changes to mouse selection.
+ (mouse-sel-primary-overlay): New var.
+ (mouse-sel-selection-alist): Use it.
+ (mouse-sel-mode): Doc fix; remove points that are default features
+ of mouse.el.
+
2011-07-12 Johan Bockgård <address@hidden>
* progmodes/compile.el (compilation-error-regexp-alist-alist):
=== modified file 'lisp/mouse-sel.el'
--- a/lisp/mouse-sel.el 2011-04-19 13:44:55 +0000
+++ b/lisp/mouse-sel.el 2011-07-12 18:59:48 +0000
@@ -202,14 +202,10 @@
With prefix ARG, turn Mouse Sel mode on if and only if ARG is positive.
Returns the new status of Mouse Sel mode (non-nil means on).
-When Mouse Sel mode is enabled, mouse selection is enhanced in various ways:
-
-- Clicking mouse-1 starts (cancels) selection, dragging extends it.
-
-- Clicking or dragging mouse-3 extends the selection as well.
-
-- Double-clicking on word constituents selects words.
-Double-clicking on symbol constituents selects symbols.
+When Mouse Sel mode is enabled, mouse selection is enhanced in
+various ways:
+
+- Double-clicking on symbol constituents selects symbols.
Double-clicking on quotes or parentheses selects sexps.
Double-clicking on whitespace selects whitespace.
Triple-clicking selects lines.
@@ -224,14 +220,8 @@
- Clicking mouse-2 inserts the contents of the primary selection at
the mouse position (or point, if `mouse-yank-at-point' is non-nil).
-- Pressing mouse-2 while selecting or extending copies selection
-to the kill ring. Pressing mouse-1 or mouse-3 kills it.
-
-- Double-clicking mouse-3 also kills selection.
-
-- M-mouse-1, M-mouse-2 & M-mouse-3 work similarly to mouse-1, mouse-2
-& mouse-3, but operate on the X secondary selection rather than the
-primary selection and region."
+- mouse-2 while selecting or extending copies selection to the
+kill ring; mouse-1 or mouse-3 kills it."
:global t
:group 'mouse-sel
(if mouse-sel-mode
@@ -286,8 +276,17 @@
(setq mouse-secondary-overlay (make-overlay 1 1))
(overlay-put mouse-secondary-overlay 'face 'secondary-selection))
+(defconst mouse-sel-primary-overlay
+ (let ((ol (make-overlay (point-min) (point-min))))
+ (delete-overlay ol)
+ (overlay-put ol 'face 'secondary-selection)
+ ol)
+ "An overlay which records the current primary selection.
+This is used by Mouse Sel mode only.")
+
(defconst mouse-sel-selection-alist
- '((SECONDARY mouse-secondary-overlay mouse-sel-secondary-thing))
+ '((PRIMARY mouse-sel-primary-overlay mouse-sel-primary-thing)
+ (SECONDARY mouse-secondary-overlay mouse-sel-secondary-thing))
"Alist associating selections with variables.
Each element is of the form:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105138: Adapt Mouse Sel mode to Emacs 24 mouse code.,
Chong Yidong <=