emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/emulation/cua-base.el


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/lisp/emulation/cua-base.el
Date: Mon, 13 May 2002 16:35:30 -0400

Index: emacs/lisp/emulation/cua-base.el
diff -c emacs/lisp/emulation/cua-base.el:1.6 
emacs/lisp/emulation/cua-base.el:1.7
*** emacs/lisp/emulation/cua-base.el:1.6        Fri May 10 07:21:10 2002
--- emacs/lisp/emulation/cua-base.el    Mon May 13 16:35:30 2002
***************
*** 388,394 ****
  
  ;;; Cursor Indication Customization
  
! (defcustom cua-enable-cursor-indications t
    "*If non-nil, use different cursor colors for indications."
    :type 'boolean
    :group 'cua)
--- 388,394 ----
  
  ;;; Cursor Indication Customization
  
! (defcustom cua-enable-cursor-indications nil
    "*If non-nil, use different cursor colors for indications."
    :type 'boolean
    :group 'cua)
***************
*** 1069,1074 ****
--- 1069,1081 ----
    (define-key cua--region-keymap [remap keyboard-quit]                
'cua-cancel)
    )
  
+ ;; State prior to enabling cua-mode
+ ;; Value is a list with the following elements:
+ ;;   transient-mark-mode
+ ;;   delete-selection-mode
+ ;;   pc-selection-mode
+ 
+ (defvar cua--saved-state nil)
  
  ;;;###autoload
  (defun cua-mode (&optional arg)
***************
*** 1110,1119 ****
  
    (if (fboundp 'cua--rectangle-on-off)
        (cua--rectangle-on-off cua-mode))
!   (setq transient-mark-mode (and cua-mode
!                                (if cua-highlight-region-shift-only
!                                    (not cua--explicit-region-start)
!                                  t))))
  
  (defun cua-debug ()
    "Toggle cua debugging."
--- 1117,1157 ----
  
    (if (fboundp 'cua--rectangle-on-off)
        (cua--rectangle-on-off cua-mode))
! 
!   (cond
!    (cua-mode
!     (setq cua--saved-state
!         (list
!          transient-mark-mode
!          (and (boundp 'delete-selection-mode) delete-selection-mode)
!          (and (boundp 'pc-selection-mode) pc-selection-mode)))
!     (if (and (boundp 'delete-selection-mode) delete-selection-mode)
!       (delete-selection-mode))
!     (if (and (boundp 'pc-selection-mode) pc-selection-mode)
!       (pc-selection-mode))
!     (setq transient-mark-mode (and cua-mode
!                                  (if cua-highlight-region-shift-only
!                                      (not cua--explicit-region-start)
!                                    t)))
!     (if (interactive-p)
!       (message "CUA mode enabled")))
!    (cua--saved-state
!     (setq transient-mark-mode (car cua--saved-state))
!     (if (nth 1 cua--saved-state)
!       (delete-selection-mode 1))
!     (if (nth 2 cua--saved-state)
!       (pc-selection-mode 1))
!     (if (interactive-p)
!       (message "CUA mode disabled.%s%s%s%s"
!                (if (nth 1 cua--saved-state) " Delete-Selection" "")
!                (if (and (nth 1 cua--saved-state) (nth 2 cua--saved-state)) " 
and" "")
!                (if (nth 2 cua--saved-state) " PC-Selection" "")
!                (if (or (nth 1 cua--saved-state) (nth 2 cua--saved-state)) " 
enabled" "")))
!     (setq cua--saved-state nil))
! 
!    (t
!     (if (interactive-p)
!       (message "CUA mode disabled")))))
  
  (defun cua-debug ()
    "Toggle cua debugging."



reply via email to

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