emacs-diffs
[Top][All Lists]
Advanced

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

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


From: David Reitter
Subject: [Emacs-diffs] emacs/lisp menu-bar.el
Date: Wed, 04 Mar 2009 18:57:53 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     David Reitter <davidswelt>      09/03/04 18:57:53

Modified files:
        lisp           : menu-bar.el 

Log message:
        (clipboard-yank): avoid checking (x-selection-exists-p) if unbound in
        order to enable the item.  For paste menu item, same, and check
        kill-ring.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/menu-bar.el?cvsroot=emacs&r1=1.352&r2=1.353

Patches:
Index: menu-bar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/menu-bar.el,v
retrieving revision 1.352
retrieving revision 1.353
diff -u -b -r1.352 -r1.353
--- menu-bar.el 27 Feb 2009 15:13:07 -0000      1.352
+++ menu-bar.el 4 Mar 2009 18:57:53 -0000       1.353
@@ -456,11 +456,13 @@
              :help "Choose a string from the kill ring and paste it"))
 (define-key menu-bar-edit-menu [paste]
   '(menu-item "Paste" yank
-             :enable (and
+             :enable (and (or
                       ;; Emacs compiled --without-x doesn't have
                       ;; x-selection-exists-p.
-                      (fboundp 'x-selection-exists-p)
-                      (x-selection-exists-p) (not buffer-read-only))
+                           (and (fboundp 'x-selection-exists-p)
+                                (x-selection-exists-p))
+                           kill-ring)
+                          (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
@@ -495,8 +497,8 @@
      '(and mark-active (not buffer-read-only)))
 (put 'clipboard-kill-ring-save 'menu-enable 'mark-active)
 (put 'clipboard-yank 'menu-enable
-     '(and (or (and (fboundp 'x-selection-exists-p)
-                   (x-selection-exists-p))
+     '(and (or (not (fboundp 'x-selection-exists-p))
+              (x-selection-exists-p)
               (x-selection-exists-p 'CLIPBOARD))
           (not buffer-read-only)))
 




reply via email to

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