aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2010-12-20 22:44:28 +0800
committerChong Yidong2010-12-20 22:44:28 +0800
commit3f95d7ffba6ad40e809253025ef7384d0fc441e3 (patch)
treeae37eee763bcc04e40de40ce51a5896933f61c46
parentf13183cf1970a94ec220000b0d0f20868df6edbc (diff)
downloademacs-3f95d7ffba6ad40e809253025ef7384d0fc441e3.tar.gz
emacs-3f95d7ffba6ad40e809253025ef7384d0fc441e3.zip
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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/menu-bar.el12
2 files changed, 8 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 98a0a943858..510bfcdd2c4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,8 +1,10 @@
12010-12-20 Chong Yidong <cyd@stupidchicken.com> 12010-12-20 Chong Yidong <cyd@stupidchicken.com>
2 2
3 * color.el: Move from gnus/. 3 * menu-bar.el (menu-bar-kill-ring-save): Make obsolete.
4 (menu-bar-edit-menu): Bind "Copy" to kill-ring-save. Don't use
5 mouse-region-match.
4 6
52010-12-20 Chong Yidong <cyd@stupidchicken.com> 7 * color.el: Move from gnus/.
6 8
7 * vc/diff.el (diff-better-file-name): Function deleted. 9 * vc/diff.el (diff-better-file-name): Function deleted.
8 abbreviating file names causes problems with shell-quote-argument. 10 abbreviating file names causes problems with shell-quote-argument.
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 989bdcff821..7babd41b69d 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -479,8 +479,7 @@
479(define-key menu-bar-edit-menu [clear] 479(define-key menu-bar-edit-menu [clear]
480 `(menu-item ,(purecopy "Clear") delete-region 480 `(menu-item ,(purecopy "Clear") delete-region
481 :enable (and mark-active 481 :enable (and mark-active
482 (not buffer-read-only) 482 (not buffer-read-only))
483 (not (mouse-region-match)))
484 :help 483 :help
485 ,(purecopy "Delete the text in region between mark and current position"))) 484 ,(purecopy "Delete the text in region between mark and current position")))
486(defvar yank-menu (cons (purecopy "Select Yank") nil)) 485(defvar yank-menu (cons (purecopy "Select Yank") nil))
@@ -510,7 +509,7 @@
510 ;; under X (for GNUstep). 509 ;; under X (for GNUstep).
511 `(menu-item ,(purecopy "Copy") ,(if (featurep 'ns) 510 `(menu-item ,(purecopy "Copy") ,(if (featurep 'ns)
512 'ns-copy-including-secondary 511 'ns-copy-including-secondary
513 'menu-bar-kill-ring-save) 512 'kill-ring-save)
514 :enable mark-active 513 :enable mark-active
515 :help ,(purecopy "Copy text in region between mark and current position") 514 :help ,(purecopy "Copy text in region between mark and current position")
516 :keys ,(purecopy (if (featurep 'ns) 515 :keys ,(purecopy (if (featurep 'ns)
@@ -534,11 +533,8 @@
534 (consp buffer-undo-list))) 533 (consp buffer-undo-list)))
535 :help ,(purecopy "Undo last operation"))) 534 :help ,(purecopy "Undo last operation")))
536 535
537(defun menu-bar-kill-ring-save (beg end) 536(define-obsolete-function-alias
538 (interactive "r") 537 'menu-bar-kill-ring-save 'kill-ring-save "24.1")
539 (if (mouse-region-match)
540 (message "Selecting a region with the mouse does `copy' automatically")
541 (kill-ring-save beg end)))
542 538
543;; These are alternative definitions for the cut, paste and copy 539;; These are alternative definitions for the cut, paste and copy
544;; menu items. Use them if your system expects these to use the clipboard. 540;; menu items. Use them if your system expects these to use the clipboard.