From: Eli Zaretskii Date: Mon, 12 Nov 2001 19:23:57 +0000 (+0000) Subject: (menu-bar-edit-menu): Don't use x-selection-exists-p if it is not fboundp. X-Git-Tag: emacs-21.2~331 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0f544bf5c446e6129c308afafc7f21bcceb3dc17;p=emacs.git (menu-bar-edit-menu): Don't use x-selection-exists-p if it is not fboundp. (clipboard-yank): Ditto. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f6179c37c4..efb2f4d605f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2001-11-12 Eli Zaretskii + + * 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 * term/w32-win.el (redisplay-dont-pause): Don't set. diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 00d009df9a8..e1d9669b8a2 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -398,7 +398,11 @@ A large number or nil slows down menu responsiveness." :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 @@ -433,7 +437,8 @@ A large number or nil slows down menu responsiveness." (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."