From: Jan Djärv Date: Mon, 3 May 2004 21:48:21 +0000 (+0000) Subject: * toolbar/tool-bar.el (tool-bar-setup): Use lookup-key for X-Git-Tag: ttn-vms-21-2-B4~6431 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0928a1d8258b49e371342234bc43f5005ff410bf;p=emacs.git * toolbar/tool-bar.el (tool-bar-setup): Use lookup-key for cut/copy/paste in case menu-bar-enable-clipboard is in effect. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f3a9555d10b..207abb2cd40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,4 +1,9 @@ -2004-05-03 Jan D. +2004-05-03 Jan Dj,Ad(Brv + + * toolbar/tool-bar.el (tool-bar-setup): Use lookup-key for + cut/copy/paste in case menu-bar-enable-clipboard is in effect. + +2004-05-03 Jan Dj,Ad(Brv * term/x-win.el (x-clipboard-yank): Don't exit on error from x-get-selection. diff --git a/lisp/toolbar/tool-bar.el b/lisp/toolbar/tool-bar.el index 425789eb80e..6b890e5078f 100644 --- a/lisp/toolbar/tool-bar.el +++ b/lisp/toolbar/tool-bar.el @@ -239,11 +239,14 @@ MAP must contain appropriate binding for `[menu-bar]' which holds a keymap." (tool-bar-add-item-from-menu 'undo "undo" nil :visible '(not (eq 'special (get major-mode 'mode-class)))) - (tool-bar-add-item-from-menu 'kill-region "cut" nil + (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut]) + "cut" nil :visible '(not (eq 'special (get major-mode 'mode-class)))) - (tool-bar-add-item-from-menu 'menu-bar-kill-ring-save "copy") - (tool-bar-add-item-from-menu 'yank "paste" nil + (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy]) + "copy") + (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste]) + "paste" nil :visible '(not (eq 'special (get major-mode 'mode-class)))) (tool-bar-add-item-from-menu 'nonincremental-search-forward "search")