From: Richard M. Stallman Date: Mon, 18 Apr 1994 21:33:57 +0000 (+0000) Subject: (menu-bar-enable-clipboard): Construct new cons cells. X-Git-Tag: emacs-19.34~8905 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5754d7f2c6f11dd83fd065aa0afa2a9d782d7242;p=emacs.git (menu-bar-enable-clipboard): Construct new cons cells. --- diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 51686bfda3a..063854e1467 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -118,9 +118,14 @@ (defun menu-bar-enable-clipboard () "Make the menu bar CUT, PASTE and COPY items use the clipboard." (interactive) - (define-key menu-bar-edit-menu [paste] '("Paste" . clipboard-yank)) - (define-key menu-bar-edit-menu [copy] '("Copy" . clipboard-kill-ring-save)) - (define-key menu-bar-edit-menu [cut] '("Cut" . clipboard-kill-region))) + ;; 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" 'clipboard-yank)) + (define-key menu-bar-edit-menu [copy] + (cons "Copy" 'clipboard-kill-ring-save)) + (define-key menu-bar-edit-menu [cut] + (cons "Cut" 'clipboard-kill-region))) ;; Sun expects these commands on these keys, so why not? (define-key global-map [f20] 'clipboard-kill-region)