Mercurial > emacs
comparison lisp/menu-bar.el @ 6948:54b252f540ea
(menu-bar-enable-clipboard): Construct new cons cells.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 18 Apr 1994 21:33:57 +0000 |
parents | 7976a0643802 |
children | b78bfe054561 |
comparison
equal
deleted
inserted
replaced
6947:c5f990fad6bb | 6948:54b252f540ea |
---|---|
116 (kill-region beg end))) | 116 (kill-region beg end))) |
117 | 117 |
118 (defun menu-bar-enable-clipboard () | 118 (defun menu-bar-enable-clipboard () |
119 "Make the menu bar CUT, PASTE and COPY items use the clipboard." | 119 "Make the menu bar CUT, PASTE and COPY items use the clipboard." |
120 (interactive) | 120 (interactive) |
121 (define-key menu-bar-edit-menu [paste] '("Paste" . clipboard-yank)) | 121 ;; We can't use constant list structure here because it becomes pure, |
122 (define-key menu-bar-edit-menu [copy] '("Copy" . clipboard-kill-ring-save)) | 122 ;; and because it gets modified with cache data. |
123 (define-key menu-bar-edit-menu [cut] '("Cut" . clipboard-kill-region))) | 123 (define-key menu-bar-edit-menu [paste] |
124 (cons "Paste" 'clipboard-yank)) | |
125 (define-key menu-bar-edit-menu [copy] | |
126 (cons "Copy" 'clipboard-kill-ring-save)) | |
127 (define-key menu-bar-edit-menu [cut] | |
128 (cons "Cut" 'clipboard-kill-region))) | |
124 | 129 |
125 ;; Sun expects these commands on these keys, so why not? | 130 ;; Sun expects these commands on these keys, so why not? |
126 (define-key global-map [f20] 'clipboard-kill-region) | 131 (define-key global-map [f20] 'clipboard-kill-region) |
127 (define-key global-map [f16] 'clipboard-kill-ring-save) | 132 (define-key global-map [f16] 'clipboard-kill-ring-save) |
128 (define-key global-map [f18] 'clipboard-yank) | 133 (define-key global-map [f18] 'clipboard-yank) |