398 |
:help "Paste (yank) text cut or copied earlier")) |
:help "Paste (yank) text cut or copied earlier")) |
399 |
(define-key menu-bar-edit-menu [paste] |
(define-key menu-bar-edit-menu [paste] |
400 |
'(menu-item "Paste" yank |
'(menu-item "Paste" yank |
401 |
:enable (and (x-selection-exists-p) (not buffer-read-only)) |
:enable (and |
402 |
|
;; Emacs compiled --without-x doesn't have |
403 |
|
;; x-selection-exists-p. |
404 |
|
(fboundp 'x-selection-exists-p) |
405 |
|
(x-selection-exists-p) (not buffer-read-only)) |
406 |
:help "Paste (yank) text most recently cut/copied")) |
:help "Paste (yank) text most recently cut/copied")) |
407 |
(define-key menu-bar-edit-menu [copy] |
(define-key menu-bar-edit-menu [copy] |
408 |
'(menu-item "Copy" menu-bar-kill-ring-save |
'(menu-item "Copy" menu-bar-kill-ring-save |
437 |
(put 'clipboard-kill-region 'menu-enable 'mark-active) |
(put 'clipboard-kill-region 'menu-enable 'mark-active) |
438 |
(put 'clipboard-kill-ring-save 'menu-enable 'mark-active) |
(put 'clipboard-kill-ring-save 'menu-enable 'mark-active) |
439 |
(put 'clipboard-yank 'menu-enable |
(put 'clipboard-yank 'menu-enable |
440 |
'(or (x-selection-exists-p) (x-selection-exists-p 'CLIPBOARD))) |
'(or (and (fboundp 'x-selection-exists-p) (x-selection-exists-p)) |
441 |
|
(x-selection-exists-p 'CLIPBOARD))) |
442 |
|
|
443 |
(defun clipboard-yank () |
(defun clipboard-yank () |
444 |
"Insert the clipboard contents, or the last stretch of killed text." |
"Insert the clipboard contents, or the last stretch of killed text." |