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,v


From: Martin Rudalics
Subject: [Emacs-diffs] Changes to emacs/lisp/menu-bar.el,v
Date: Mon, 19 Nov 2007 07:48:56 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Martin Rudalics <m061211>       07/11/19 07:48:56

Index: menu-bar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/menu-bar.el,v
retrieving revision 1.313
retrieving revision 1.314
diff -u -b -r1.313 -r1.314
--- menu-bar.el 27 Oct 2007 09:07:12 -0000      1.313
+++ menu-bar.el 19 Nov 2007 07:48:56 -0000      1.314
@@ -504,11 +504,14 @@
 ;; These are alternative definitions for the cut, paste and copy
 ;; menu items.  Use them if your system expects these to use the clipboard.
 
-(put 'clipboard-kill-region 'menu-enable 'mark-active)
+(put 'clipboard-kill-region 'menu-enable
+     '(and mark-active (not buffer-read-only)))
 (put 'clipboard-kill-ring-save 'menu-enable 'mark-active)
 (put 'clipboard-yank 'menu-enable
-     '(or (and (fboundp 'x-selection-exists-p) (x-selection-exists-p))
-         (x-selection-exists-p 'CLIPBOARD)))
+     '(and (or (and (fboundp 'x-selection-exists-p)
+                   (x-selection-exists-p))
+              (x-selection-exists-p 'CLIPBOARD))
+          (not buffer-read-only)))
 
 (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]