]> git.eshelyaron.com Git - emacs.git/commitdiff
(menu-bar-edit-menu): Don't use x-selection-exists-p if
authorEli Zaretskii <eliz@gnu.org>
Sun, 11 Nov 2001 14:02:54 +0000 (14:02 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 11 Nov 2001 14:02:54 +0000 (14:02 +0000)
it is not fboundp.
(clipboard-yank): Ditto.

lisp/ChangeLog
lisp/menu-bar.el

index 2a395e7876ec50bec2964705c1dc67a5c36b27ad..9ca5f0f5e9052d00c0f596a73f634529761590f3 100644 (file)
@@ -1,3 +1,9 @@
+2001-11-11  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-11  Colin Walters  <walters@verbum.org>
 
        The following changes are based on patches from
index 6a9da349a177cb29a197e64575ec2ed8d168fe78..5d169aaea2b6fb53f8a29345683fa7fd2a5ba082 100644 (file)
@@ -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."