emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r102693: Bind "Copy" menu item to kil


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102693: Bind "Copy" menu item to kill-ring-save, obsoleting menu-bar-kill-ring-save.
Date: Mon, 20 Dec 2010 22:44:28 +0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102693
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Mon 2010-12-20 22:44:28 +0800
message:
  Bind "Copy" menu item to kill-ring-save, obsoleting menu-bar-kill-ring-save.
  
  * menu-bar.el (menu-bar-kill-ring-save): Make obsolete.
  (menu-bar-edit-menu): Bind "Copy" to kill-ring-save.  Don't use
  mouse-region-match.
modified:
  lisp/ChangeLog
  lisp/menu-bar.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-12-20 03:18:56 +0000
+++ b/lisp/ChangeLog    2010-12-20 14:44:28 +0000
@@ -1,9 +1,11 @@
 2010-12-20  Chong Yidong  <address@hidden>
 
+       * menu-bar.el (menu-bar-kill-ring-save): Make obsolete.
+       (menu-bar-edit-menu): Bind "Copy" to kill-ring-save.  Don't use
+       mouse-region-match.
+
        * color.el: Move from gnus/.
 
-2010-12-20  Chong Yidong  <address@hidden>
-
        * vc/diff.el (diff-better-file-name): Function deleted.
        abbreviating file names causes problems with shell-quote-argument.
        (diff-no-select): Just use expand-file-name.

=== modified file 'lisp/menu-bar.el'
--- a/lisp/menu-bar.el  2010-12-17 04:04:06 +0000
+++ b/lisp/menu-bar.el  2010-12-20 14:44:28 +0000
@@ -479,8 +479,7 @@
 (define-key menu-bar-edit-menu [clear]
   `(menu-item ,(purecopy "Clear") delete-region
              :enable (and mark-active
-                          (not buffer-read-only)
-                          (not (mouse-region-match)))
+                          (not buffer-read-only))
              :help
              ,(purecopy "Delete the text in region between mark and current 
position")))
 (defvar yank-menu (cons (purecopy "Select Yank") nil))
@@ -510,7 +509,7 @@
   ;; under X (for GNUstep).
   `(menu-item ,(purecopy "Copy") ,(if (featurep 'ns)
                                       'ns-copy-including-secondary
-                                    'menu-bar-kill-ring-save)
+                                    'kill-ring-save)
               :enable mark-active
               :help ,(purecopy "Copy text in region between mark and current 
position")
               :keys ,(purecopy (if (featurep 'ns)
@@ -534,11 +533,8 @@
                             (consp buffer-undo-list)))
              :help ,(purecopy "Undo last operation")))
 
-(defun menu-bar-kill-ring-save (beg end)
-  (interactive "r")
-  (if (mouse-region-match)
-      (message "Selecting a region with the mouse does `copy' automatically")
-    (kill-ring-save beg end)))
+(define-obsolete-function-alias
+  'menu-bar-kill-ring-save 'kill-ring-save "24.1")
 
 ;; These are alternative definitions for the cut, paste and copy
 ;; menu items.  Use them if your system expects these to use the clipboard.


reply via email to

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