comparison lisp/menu-bar.el @ 6745:469d679ca338

(global-map): Bind function keys f16, f18 and f20, which Sun knows as copy, paste and cut.
author Richard M. Stallman <rms@gnu.org>
date Fri, 08 Apr 1994 05:26:47 +0000
parents 59e74bc34228
children 7976a0643802
comparison
equal deleted inserted replaced
6744:67485a72803d 6745:469d679ca338
90 (autoload 'ispell-menu-map "ispell" nil t 'keymap) 90 (autoload 'ispell-menu-map "ispell" nil t 'keymap)
91 91
92 ;; These are alternative definitions for the cut, paste and copy 92 ;; These are alternative definitions for the cut, paste and copy
93 ;; menu items. Use them if your system expects these to use the clipboard 93 ;; menu items. Use them if your system expects these to use the clipboard
94 94
95 (define-key global-map [cut] 'clipboard-kill-region)
96 (define-key global-map [copy] 'clipboard-kill-ring-save)
97 (define-key global-map [paste] 'clipboard-yank)
98
99 (put 'clipboard-kill-region 'menu-enable 'mark-active) 95 (put 'clipboard-kill-region 'menu-enable 'mark-active)
100 (put 'clipboard-kill-ring-save 'menu-enable 'mark-active) 96 (put 'clipboard-kill-ring-save 'menu-enable 'mark-active)
101 (put 'clipboard-yank 'menu-enable 97 (put 'clipboard-yank 'menu-enable
102 '(or (x-selection-exists-p) (x-selection-exists-p 'CLIPBOARD))) 98 '(or (x-selection-exists-p) (x-selection-exists-p 'CLIPBOARD)))
103 99
123 "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."
124 (interactive) 120 (interactive)
125 (define-key menu-bar-edit-menu [paste] '("Paste" . clipboard-yank)) 121 (define-key menu-bar-edit-menu [paste] '("Paste" . clipboard-yank))
126 (define-key menu-bar-edit-menu [copy] '("Copy" . clipboard-kill-ring-save)) 122 (define-key menu-bar-edit-menu [copy] '("Copy" . clipboard-kill-ring-save))
127 (define-key menu-bar-edit-menu [cut] '("Cut" . clipboard-kill-region))) 123 (define-key menu-bar-edit-menu [cut] '("Cut" . clipboard-kill-region)))
124
125 ;; Sun expects these commands on these keys, so why not?
126 (define-key global-map [f20] 'clipboard-kill-region)
127 (define-key global-map [f16] 'clipboard-kill-ring-save)
128 (define-key global-map [f18] 'clipboard-yank)
128 129
129 (define-key menu-bar-help-menu [emacs-tutorial] 130 (define-key menu-bar-help-menu [emacs-tutorial]
130 '("Emacs Tutorial" . help-with-tutorial)) 131 '("Emacs Tutorial" . help-with-tutorial))
131 (define-key menu-bar-help-menu [man] '("Man..." . manual-entry)) 132 (define-key menu-bar-help-menu [man] '("Man..." . manual-entry))
132 (define-key menu-bar-help-menu [describe-variable] 133 (define-key menu-bar-help-menu [describe-variable]