diff options
| author | Stefan Monnier | 2003-05-13 19:13:13 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-05-13 19:13:13 +0000 |
| commit | c960446b52b72e5e9df6bfd0918b8160367ebe02 (patch) | |
| tree | 618a09895df73433f5cf6486bc8f83d673ee790d | |
| parent | 00f9fb8b3604bf0f54a1ca71a47593ab6d37efef (diff) | |
| download | emacs-c960446b52b72e5e9df6bfd0918b8160367ebe02.tar.gz emacs-c960446b52b72e5e9df6bfd0918b8160367ebe02.zip | |
(menu-bar-options-menu) <cua-mode>: Use menu-bar-make-mm-toggle.
| -rw-r--r-- | lisp/menu-bar.el | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 596241c08b6..dda1a3f6b0c 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; menu-bar.el --- define a default menu bar | 1 | ;;; menu-bar.el --- define a default menu bar |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1993,94,1995,2000,01,02,2003 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: RMS | 5 | ;; Author: RMS |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -882,22 +882,9 @@ PROPS are additional properties." | |||
| 882 | (define-key menu-bar-options-menu [edit-options-separator] | 882 | (define-key menu-bar-options-menu [edit-options-separator] |
| 883 | '("--")) | 883 | '("--")) |
| 884 | (define-key menu-bar-options-menu [cua-mode] | 884 | (define-key menu-bar-options-menu [cua-mode] |
| 885 | '(menu-item "CUA-style cut and paste" | 885 | (menu-bar-make-mm-toggle cua-mode |
| 886 | menu-bar-toggle-cua-mode | 886 | "CUA-style cut and paste" |
| 887 | :help "Use C-z/C-x/C-c/C-v keys for undo/cut/copy/paste" | 887 | "Use C-z/C-x/C-c/C-v keys for undo/cut/copy/paste")) |
| 888 | :button (:toggle . cua-mode))) | ||
| 889 | |||
| 890 | (defun menu-bar-toggle-cua-mode () | ||
| 891 | "Toggle CUA key-binding mode. | ||
| 892 | When enabled, using shifted movement keys will activate the region (and | ||
| 893 | highlight the region using `transient-mark-mode'), and typed text replaces | ||
| 894 | the active selection. C-z, C-x, C-c, and C-v will undo, cut, copy, and | ||
| 895 | paste (in addition to the normal Emacs bindings)." | ||
| 896 | (interactive) | ||
| 897 | (cua-mode nil) | ||
| 898 | (customize-mark-as-set 'cua-mode) | ||
| 899 | (message "CUA-style cut and paste %s" | ||
| 900 | (if cua-mode "enabled" "disabled"))) | ||
| 901 | 888 | ||
| 902 | (define-key menu-bar-options-menu [case-fold-search] | 889 | (define-key menu-bar-options-menu [case-fold-search] |
| 903 | (menu-bar-make-toggle toggle-case-fold-search case-fold-search | 890 | (menu-bar-make-toggle toggle-case-fold-search case-fold-search |