[Top][All Lists]
[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, 07 Feb 2005 06:44:41 -0500 |
Index: emacs/lisp/emulation/cua-base.el
diff -c emacs/lisp/emulation/cua-base.el:1.38
emacs/lisp/emulation/cua-base.el:1.39
*** emacs/lisp/emulation/cua-base.el:1.38 Tue Dec 14 12:18:30 2004
--- emacs/lisp/emulation/cua-base.el Mon Feb 7 11:44:40 2005
***************
*** 1,6 ****
;;; cua-base.el --- emulate CUA key bindings
! ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
;; Free Software Foundation, Inc.
;; Author: Kim F. Storm <address@hidden>
--- 1,6 ----
;;; cua-base.el --- emulate CUA key bindings
! ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Kim F. Storm <address@hidden>
***************
*** 392,402 ****
"*Font used by CUA for highlighting the non-selected rectangle lines."
:group 'cua)
- (defcustom cua-undo-max 64
- "*Max no of undoable CUA rectangle changes (including undo)."
- :type 'integer
- :group 'cua)
-
;;; Global Mark Customization
--- 392,397 ----
***************
*** 739,753 ****
(+ arg ?0)))
(if cua--register nil arg))
- ;;; Enhanced undo - restore rectangle selections
-
- (defun cua-undo (&optional arg)
- "Undo some previous changes.
- Knows about CUA rectangle highlighting in addition to standard undo."
- (interactive "*P")
- (if (fboundp 'cua--rectangle-undo)
- (cua--rectangle-undo arg)
- (undo arg)))
;;; Region specific commands
--- 734,739 ----
***************
*** 988,1008 ****
(if cua-enable-region-auto-help
(cua-help-for-region t)))))
- (defvar cua--standard-movement-commands
- '(forward-char backward-char
- next-line previous-line
- forward-word backward-word
- end-of-line beginning-of-line
- end-of-buffer beginning-of-buffer
- scroll-up scroll-down cua-scroll-up cua-scroll-down
- forward-sentence backward-sentence
- forward-paragraph backward-paragraph)
- "List of standard movement commands.
- Extra commands should be added to `cua-movement-commands'")
-
- (defvar cua-movement-commands nil
- "User may add additional movement commands to this list.")
-
;;; Scrolling commands which does not signal errors at top/bottom
;;; of buffer at first key-press (instead moves to top/bottom
;;; of buffer).
--- 974,979 ----
***************
*** 1025,1030 ****
--- 996,1003 ----
(scroll-up arg)
(end-of-buffer (goto-char (point-max)))))))
+ (put 'cua-scroll-up 'CUA 'move)
+
(defun cua-scroll-down (&optional arg)
"Scroll text of current window downward ARG lines; or near full screen if
no ARG.
If window cannot be scrolled further, move cursor to top line instead.
***************
*** 1043,1048 ****
--- 1016,1023 ----
(scroll-down arg)
(beginning-of-buffer (goto-char (point-min)))))))
+ (put 'cua-scroll-up 'CUA 'move)
+
;;; Cursor indications
(defun cua--update-indications ()
***************
*** 1073,1080 ****
(defun cua--pre-command-handler ()
(condition-case nil
! (let ((movement (or (memq this-command cua--standard-movement-commands)
! (memq this-command cua-movement-commands))))
;; Cancel prefix key timeout if user enters another key.
(when cua--prefix-override-timer
--- 1048,1054 ----
(defun cua--pre-command-handler ()
(condition-case nil
! (let ((movement (eq (get this-command 'CUA) 'move)))
;; Cancel prefix key timeout if user enters another key.
(when cua--prefix-override-timer
***************
*** 1251,1259 ****
(define-key cua-global-keymap [remap yank-pop] 'cua-paste-pop)
;; set mark
(define-key cua-global-keymap [remap set-mark-command] 'cua-set-mark)
- ;; undo
- (define-key cua-global-keymap [remap undo] 'cua-undo)
- (define-key cua-global-keymap [remap advertised-undo] 'cua-undo)
;; scrolling
(define-key cua-global-keymap [remap scroll-up] 'cua-scroll-up)
--- 1225,1230 ----
***************
*** 1305,1310 ****
--- 1276,1295 ----
(define-key cua--region-keymap [remap keyboard-quit]
'cua-cancel)
)
+
+ ;; Setup standard movement commands to be recognized by CUA.
+
+ (dolist (cmd
+ '(forward-char backward-char
+ next-line previous-line
+ forward-word backward-word
+ end-of-line beginning-of-line
+ end-of-buffer beginning-of-buffer
+ scroll-up scroll-down
+ forward-sentence backward-sentence
+ forward-paragraph backward-paragraph))
+ (put cmd 'CUA 'move))
+
;; State prior to enabling cua-mode
;; Value is a list with the following elements:
;; transient-mark-mode
***************
*** 1350,1358 ****
(add-to-list 'emulation-mode-map-alists 'cua--keymap-alist)
(cua--select-keymaps))
- (if (fboundp 'cua--rectangle-on-off)
- (cua--rectangle-on-off cua-mode))
-
(cond
(cua-mode
(setq cua--saved-state
--- 1335,1340 ----
- [Emacs-diffs] Changes to emacs/lisp/emulation/cua-base.el,
Kim F . Storm <=