From 0928a1d8258b49e371342234bc43f5005ff410bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 3 May 2004 21:48:21 +0000 Subject: * toolbar/tool-bar.el (tool-bar-setup): Use lookup-key for cut/copy/paste in case menu-bar-enable-clipboard is in effect. --- lisp/ChangeLog | 7 ++++++- lisp/toolbar/tool-bar.el | 9 ++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'lisp') 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") -- cgit v1.2.1