+2001-11-12 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * menu-bar.el (menu-bar-edit-menu): Don't use x-selection-exists-p if
+ it is not fboundp.
+ (clipboard-yank): Ditto.
+
2001-11-10 Jason Rumney <jasonr@gnu.org>
* term/w32-win.el (redisplay-dont-pause): Don't set.
:help "Paste (yank) text cut or copied earlier"))
(define-key menu-bar-edit-menu [paste]
'(menu-item "Paste" yank
- :enable (and (x-selection-exists-p) (not buffer-read-only))
+ :enable (and
+ ;; Emacs compiled --without-x doesn't have
+ ;; x-selection-exists-p.
+ (fboundp 'x-selection-exists-p)
+ (x-selection-exists-p) (not buffer-read-only))
:help "Paste (yank) text most recently cut/copied"))
(define-key menu-bar-edit-menu [copy]
'(menu-item "Copy" menu-bar-kill-ring-save
(put 'clipboard-kill-region 'menu-enable 'mark-active)
(put 'clipboard-kill-ring-save 'menu-enable 'mark-active)
(put 'clipboard-yank 'menu-enable
- '(or (x-selection-exists-p) (x-selection-exists-p 'CLIPBOARD)))
+ '(or (and (fboundp 'x-selection-exists-p) (x-selection-exists-p))
+ (x-selection-exists-p 'CLIPBOARD)))
(defun clipboard-yank ()
"Insert the clipboard contents, or the last stretch of killed text."