emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/menu-bar.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/menu-bar.el
Date: Thu, 15 Nov 2001 15:29:44 -0500

Index: emacs/lisp/menu-bar.el
diff -u emacs/lisp/menu-bar.el:1.183 emacs/lisp/menu-bar.el:1.184
--- emacs/lisp/menu-bar.el:1.183        Fri Oct 12 15:59:32 2001
+++ emacs/lisp/menu-bar.el      Sun Nov 11 09:02:15 2001
@@ -398,7 +398,11 @@
              :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 @@
 (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."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]