/[emacs]/emacs/lisp/menu-bar.el
ViewVC logotype

Diff of /emacs/lisp/menu-bar.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.237 by jhd, Sat Mar 1 15:55:04 2003 UTC revision 1.238 by monnier, Tue May 13 19:13:13 2003 UTC
# Line 1  Line 1 
1  ;;; menu-bar.el --- define a default menu bar  ;;; menu-bar.el --- define a default menu bar
2    
3  ;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002 Free Software Foundation, Inc.  ;; Copyright (C) 1993,94,1995,2000,01,02,2003  Free Software Foundation, Inc.
4    
5  ;; Author: RMS  ;; Author: RMS
6  ;; Maintainer: FSF  ;; Maintainer: FSF
# Line 882  PROPS are additional properties." Line 882  PROPS are additional properties."
882  (define-key menu-bar-options-menu [edit-options-separator]  (define-key menu-bar-options-menu [edit-options-separator]
883    '("--"))    '("--"))
884  (define-key menu-bar-options-menu [cua-mode]  (define-key menu-bar-options-menu [cua-mode]
885    '(menu-item "CUA-style cut and paste"    (menu-bar-make-mm-toggle cua-mode
886                menu-bar-toggle-cua-mode                             "CUA-style cut and paste"
887                :help "Use C-z/C-x/C-c/C-v keys for undo/cut/copy/paste"                             "Use C-z/C-x/C-c/C-v keys for undo/cut/copy/paste"))
               :button (:toggle . cua-mode)))  
   
 (defun menu-bar-toggle-cua-mode ()  
   "Toggle CUA key-binding mode.  
 When enabled, using shifted movement keys will activate the region (and  
 highlight the region using `transient-mark-mode'), and typed text replaces  
 the active selection.  C-z, C-x, C-c, and C-v will undo, cut, copy, and  
 paste (in addition to the normal Emacs bindings)."  
   (interactive)  
   (cua-mode nil)  
   (customize-mark-as-set 'cua-mode)  
   (message "CUA-style cut and paste %s"  
            (if cua-mode "enabled" "disabled")))  
888    
889  (define-key menu-bar-options-menu [case-fold-search]  (define-key menu-bar-options-menu [case-fold-search]
890    (menu-bar-make-toggle toggle-case-fold-search case-fold-search    (menu-bar-make-toggle toggle-case-fold-search case-fold-search

Legend:
Removed from v.1.237  
changed lines
  Added in v.1.238

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26