]> git.eshelyaron.com Git - emacs.git/commitdiff
Bind "Copy" menu item to kill-ring-save, obsoleting menu-bar-kill-ring-save.
authorChong Yidong <cyd@stupidchicken.com>
Mon, 20 Dec 2010 14:44:28 +0000 (22:44 +0800)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 20 Dec 2010 14:44:28 +0000 (22:44 +0800)
* 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.

lisp/ChangeLog
lisp/menu-bar.el

index 98a0a9438589cbf3a39d4b0839c0e913fed5af8d..510bfcdd2c45043695c2e1b66070f9c3e40c8a4b 100644 (file)
@@ -1,8 +1,10 @@
 2010-12-20  Chong Yidong  <cyd@stupidchicken.com>
 
-       * color.el: Move from gnus/.
+       * 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.
 
-2010-12-20  Chong Yidong  <cyd@stupidchicken.com>
+       * color.el: Move from gnus/.
 
        * vc/diff.el (diff-better-file-name): Function deleted.
        abbreviating file names causes problems with shell-quote-argument.
index 989bdcff821afb47ec40f10f2ccdab5c1c4ebea9..7babd41b69dbb1c0eba4183065c38beb21e0f502 100644 (file)
 (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))
   ;; 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)
                             (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.