Mercurial > emacs
comparison lisp/menu-bar.el @ 109398:c9970d4bfd62
Change clipboard/primary selection to X application standards.
* lisp/menu-bar.el (menu-bar-enable-clipboard): Don't overwrite
Cut/Copy/Paste menu bar items.
* lisp/mouse.el: Bind mouse-2 to mouse-yank-primary.
(mouse-drag-copy-region): Default to nil.
* lisp/simple.el (select-active-regions): Default to t.
(push-mark-command): Don't overwrite primary with empty string.
* lisp/term/x-win.el (x-select-enable-clipboard): Default to t.
(x-initialize-window-system): Don't overwrite Paste menu item.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 14 Jul 2010 14:03:39 -0400 |
parents | 783986775ee8 |
children | 06384b3caebf |
comparison
equal
deleted
inserted
replaced
109397:4e6b8160da4b | 109398:c9970d4bfd62 |
---|---|
524 | 524 |
525 (defun menu-bar-enable-clipboard () | 525 (defun menu-bar-enable-clipboard () |
526 "Make CUT, PASTE and COPY (keys and menu bar items) use the clipboard. | 526 "Make CUT, PASTE and COPY (keys and menu bar items) use the clipboard. |
527 Do the same for the keys of the same name." | 527 Do the same for the keys of the same name." |
528 (interactive) | 528 (interactive) |
529 ;; We can't use constant list structure here because it becomes pure, | |
530 ;; and because it gets modified with cache data. | |
531 (define-key menu-bar-edit-menu [paste] | |
532 (cons "Paste" (cons "Paste text from clipboard" 'clipboard-yank))) | |
533 (define-key menu-bar-edit-menu [copy] | |
534 (cons "Copy" (cons "Copy text in region to the clipboard" | |
535 'clipboard-kill-ring-save))) | |
536 (define-key menu-bar-edit-menu [cut] | |
537 (cons "Cut" (cons "Delete text in region and copy it to the clipboard" | |
538 'clipboard-kill-region))) | |
539 | |
540 ;; These are Sun server keysyms for the Cut, Copy and Paste keys | 529 ;; These are Sun server keysyms for the Cut, Copy and Paste keys |
541 ;; (also for XFree86 on Sun keyboard): | 530 ;; (also for XFree86 on Sun keyboard): |
542 (define-key global-map [f20] 'clipboard-kill-region) | 531 (define-key global-map [f20] 'clipboard-kill-region) |
543 (define-key global-map [f16] 'clipboard-kill-ring-save) | 532 (define-key global-map [f16] 'clipboard-kill-ring-save) |
544 (define-key global-map [f18] 'clipboard-yank) | 533 (define-key global-map [f18] 'clipboard-yank) |