*** The option `mouse-region-delete-keys' has been deleted.
+** Selection changes.
+
+The way Emacs interacts with the clipboard and primary selection, by
+default, is now similar to other X applications. In particular, kill
+and yank use the clipboard, in addition to the primary selection.
+
+*** `select-active-regions' now defaults to t.
+
+*** `x-select-enable-clipboard' now defaults to t.
+
+*** `mouse-drag-copy-region' now defaults to nil.
+
+*** `mouse-2' is now bound to `mouse-yank-primary'.
+
\f
* Changes in Specialized Modes and Packages in Emacs 24.1
+2010-07-14 Chong Yidong <cyd@stupidchicken.com>
+
+ * term/x-win.el (x-select-enable-clipboard): Default to t.
+ (x-initialize-window-system): Don't overwrite Paste menu item.
+
+ * simple.el (select-active-regions): Default to t.
+ (push-mark-command): Don't overwrite primary with empty string.
+
+ * mouse.el: Bind mouse-2 to mouse-yank-primary.
+ (mouse-drag-copy-region): Default to nil.
+
+ * menu-bar.el (menu-bar-enable-clipboard): Don't overwrite
+ Cut/Copy/Paste menu bar items.
+
2010-07-13 Thierry Volpiatto <thierry.volpiatto@gmail.com>
Allow C-w when setting a bookmark in a Gnus Article buffer (Bug#5975).
"Make CUT, PASTE and COPY (keys and menu bar items) use the clipboard.
Do the same for the keys of the same name."
(interactive)
- ;; We can't use constant list structure here because it becomes pure,
- ;; and because it gets modified with cache data.
- (define-key menu-bar-edit-menu [paste]
- (cons "Paste" (cons "Paste text from clipboard" 'clipboard-yank)))
- (define-key menu-bar-edit-menu [copy]
- (cons "Copy" (cons "Copy text in region to the clipboard"
- 'clipboard-kill-ring-save)))
- (define-key menu-bar-edit-menu [cut]
- (cons "Cut" (cons "Delete text in region and copy it to the clipboard"
- 'clipboard-kill-region)))
-
;; These are Sun server keysyms for the Cut, Copy and Paste keys
;; (also for XFree86 on Sun keyboard):
(define-key global-map [f20] 'clipboard-kill-region)
:type 'boolean
:group 'mouse)
-(defcustom mouse-drag-copy-region t
+(defcustom mouse-drag-copy-region nil
"If non-nil, mouse drag copies region to kill-ring."
:type 'boolean
:version "22.1"
(global-set-key [left-fringe mouse-1] 'mouse-set-point)
(global-set-key [right-fringe mouse-1] 'mouse-set-point)
-(global-set-key [mouse-2] 'mouse-yank-at-click)
+(global-set-key [mouse-2] 'mouse-yank-primary)
;; Allow yanking also when the corresponding cursor is "in the fringe".
(global-set-key [right-fringe mouse-2] 'mouse-yank-at-click)
(global-set-key [left-fringe mouse-2] 'mouse-yank-at-click)
(marker-position (mark-marker))
(signal 'mark-inactive nil)))
-(defcustom select-active-regions nil
+(defcustom select-active-regions t
"If non-nil, an active region automatically becomes the window selection."
:type 'boolean
:group 'killing
mark-active
(display-selections-p)
(x-selection-owner-p 'PRIMARY)
+ (not (eq (region-beginning) (region-end)))
(x-set-selection 'PRIMARY (buffer-substring-no-properties
(region-beginning) (region-end))))
(if (and (null force)
(push-mark nil nomsg t)
(setq mark-active t)
(run-hooks 'activate-mark-hook)
+ (and select-active-regions (display-selections-p)
+ (x-set-selection 'PRIMARY (current-buffer)))
(unless nomsg
(message "Mark activated")))))
"Max number of characters to put in the cut buffer.
It is said that overlarge strings are slow to put into the cut buffer.")
-(defcustom x-select-enable-clipboard nil
+(defcustom x-select-enable-clipboard t
"Non-nil means cutting and pasting uses the clipboard.
-This is in addition to, but in preference to, the primary selection.
-
-On MS-Windows, this is non-nil by default, since Windows does not
-support other types of selections. \(The primary selection that is
-set by Emacs is not accessible to other programs on Windows.\)"
+This is in addition to, but in preference to, the primary selection."
:type 'boolean
:group 'killing)
;; Enable CLIPBOARD copy/paste through menu bar commands.
(menu-bar-enable-clipboard)
- ;; Override Paste so it looks at CLIPBOARD first.
- (define-key menu-bar-edit-menu [paste]
- (append '(menu-item "Paste" x-clipboard-yank
- :enable (not buffer-read-only)
- :help "Paste (yank) text most recently cut/copied")
- nil))
+ ;; ;; Override Paste so it looks at CLIPBOARD first.
+ ;; (define-key menu-bar-edit-menu [paste]
+ ;; (append '(menu-item "Paste" x-clipboard-yank
+ ;; :enable (not buffer-read-only)
+ ;; :help "Paste (yank) text most recently cut/copied")
+ ;; nil))
(setq x-initialized t))