[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emulation/cua-rect.el
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emulation/cua-rect.el |
Date: |
Fri, 04 Apr 2003 01:22:02 -0500 |
Index: emacs/lisp/emulation/cua-rect.el
diff -c emacs/lisp/emulation/cua-rect.el:1.6
emacs/lisp/emulation/cua-rect.el:1.7
*** emacs/lisp/emulation/cua-rect.el:1.6 Thu Jul 4 18:20:26 2002
--- emacs/lisp/emulation/cua-rect.el Tue Feb 4 07:56:02 2003
***************
*** 88,94 ****
(let ((l cua--undo-list))
(while l
(if (eq (car (car l)) pending-undo-list)
! (setq cua--restored-rectangle
(and (vectorp (cdr (car l))) (cdr (car l)))
l nil)
(setq l (cdr l)))))
--- 88,94 ----
(let ((l cua--undo-list))
(while l
(if (eq (car (car l)) pending-undo-list)
! (setq cua--restored-rectangle
(and (vectorp (cdr (car l))) (cdr (car l)))
l nil)
(setq l (cdr l)))))
***************
*** 126,132 ****
(setcdr cul nil))
(setq cua--tidy-undo-counter (1+ cua--tidy-undo-counter))
(if cua--debug
! (message "Clean undo list in %s (%d)"
(buffer-name) cc)))))))
(setq buffers (cdr buffers)))
(/= cnt cua--tidy-undo-counter)))
--- 126,132 ----
(setcdr cul nil))
(setq cua--tidy-undo-counter (1+ cua--tidy-undo-counter))
(if cua--debug
! (message "Clean undo list in %s (%d)"
(buffer-name) cc)))))))
(setq buffers (cdr buffers)))
(/= cnt cua--tidy-undo-counter)))
***************
*** 176,182 ****
(let ((c (aref cua--rectangle 4)))
(if (not (integerp advance))
c
! (aset cua--rectangle 4
(if (= advance 0)
(- 3 c) ; opposite corner
(mod (+ c 4 advance) 4)))
--- 176,182 ----
(let ((c (aref cua--rectangle 4)))
(if (not (integerp advance))
c
! (aset cua--rectangle 4
(if (= advance 0)
(- 3 c) ; opposite corner
(mod (+ c 4 advance) 4)))
***************
*** 302,310 ****
(cua--rectangle-right (1+ (cua--rectangle-right)))
(move-to-column (cua--rectangle-right) pad))
((cua--rectangle-right-side)
! (forward-char 1)
(cua--rectangle-right (current-column)))
! ((or pad (eolp))
(cua--rectangle-left (1+ (cua--rectangle-left)))
(move-to-column (cua--rectangle-right) pad))
(t
--- 302,310 ----
(cua--rectangle-right (1+ (cua--rectangle-right)))
(move-to-column (cua--rectangle-right) pad))
((cua--rectangle-right-side)
! (forward-char 1)
(cua--rectangle-right (current-column)))
! ((or pad (eolp))
(cua--rectangle-left (1+ (cua--rectangle-left)))
(move-to-column (cua--rectangle-right) pad))
(t
***************
*** 666,673 ****
;; Turn on rectangular marking mode by disabling transient mark mode
;; and manually handling highlighting from a post command hook.
;; Be careful if we are already marking a rectangle.
! (setq cua--rectangle
! (if (and cua--last-rectangle
(eq (car cua--last-rectangle) (current-buffer))
(eq (car (cdr cua--last-rectangle)) (point)))
(cdr (cdr cua--last-rectangle))
--- 666,673 ----
;; Turn on rectangular marking mode by disabling transient mark mode
;; and manually handling highlighting from a post command hook.
;; Be careful if we are already marking a rectangle.
! (setq cua--rectangle
! (if (and cua--last-rectangle
(eq (car cua--last-rectangle) (current-buffer))
(eq (car (cdr cua--last-rectangle)) (point)))
(cdr (cdr cua--last-rectangle))
***************
*** 684,690 ****
(defun cua--deactivate-rectangle ()
;; This is used to clean up after `cua--activate-rectangle'.
(mapcar (function delete-overlay) cua--rectangle-overlays)
! (setq cua--last-rectangle (cons (current-buffer)
(cons (point) ;; cua-save-point
cua--rectangle))
cua--rectangle nil
--- 684,690 ----
(defun cua--deactivate-rectangle ()
;; This is used to clean up after `cua--activate-rectangle'.
(mapcar (function delete-overlay) cua--rectangle-overlays)
! (setq cua--last-rectangle (cons (current-buffer)
(cons (point) ;; cua-save-point
cua--rectangle))
cua--rectangle nil
***************
*** 827,833 ****
(cua--rectangle-restriction (car r) t (not (car (cdr (cdr r)))))
(cua--rectangle-restriction "" nil nil))
(cua--rectangle-restriction
! (format "[%c]"
(read-char "Restrictive rectangle (char): ")) t arg))))
(defun cua-move-rectangle-up ()
--- 827,833 ----
(cua--rectangle-restriction (car r) t (not (car (cdr (cdr r)))))
(cua--rectangle-restriction "" nil nil))
(cua--rectangle-restriction
! (format "[%c]"
(read-char "Restrictive rectangle (char): ")) t arg))))
(defun cua-move-rectangle-up ()
***************
*** 1040,1046 ****
(defun cua-sequence-rectangle (first incr fmt)
"Resequence each line of CUA rectangle starting from FIRST.
The numbers are formatted according to the FORMAT string."
! (interactive
(list (if current-prefix-arg
(prefix-numeric-value current-prefix-arg)
(string-to-number
--- 1040,1046 ----
(defun cua-sequence-rectangle (first incr fmt)
"Resequence each line of CUA rectangle starting from FIRST.
The numbers are formatted according to the FORMAT string."
! (interactive
(list (if current-prefix-arg
(prefix-numeric-value current-prefix-arg)
(string-to-number
***************
*** 1169,1175 ****
(interactive (list
current-prefix-arg
(read-from-minibuffer "Shell command on rectangle: "
! nil nil nil
'shell-command-history)))
(cua--rectangle-aux-replace -1 t t replace 1
'(lambda (s e)
--- 1169,1175 ----
(interactive (list
current-prefix-arg
(read-from-minibuffer "Shell command on rectangle: "
! nil nil nil
'shell-command-history)))
(cua--rectangle-aux-replace -1 t t replace 1
'(lambda (s e)
***************
*** 1185,1191 ****
"Remove the first line of the rectangle and scroll remaining lines up."
(interactive)
(cua--rectangle-aux-replace 0 t t t t
! '(lambda (s e)
(if (= (forward-line 1) 0)
(delete-region s (point))))))
--- 1185,1191 ----
"Remove the first line of the rectangle and scroll remaining lines up."
(interactive)
(cua--rectangle-aux-replace 0 t t t t
! '(lambda (s e)
(if (= (forward-line 1) 0)
(delete-region s (point))))))
***************
*** 1225,1231 ****
indent)
(cua--rectangle-operation 'corners nil t pad
'(lambda (s e l r)
! (move-to-column
(if (cua--rectangle-right-side t)
(max (1+ r) col) l)
pad)
--- 1225,1231 ----
indent)
(cua--rectangle-operation 'corners nil t pad
'(lambda (s e l r)
! (move-to-column
(if (cua--rectangle-right-side t)
(max (1+ r) col) l)
pad)
***************
*** 1243,1251 ****
(defun cua-help-for-rectangle (&optional help)
(interactive)
(let ((M (if cua-use-hyper-key " H-" " M-")))
! (message
(concat (if help "C-?:help" "")
! M "p:pad" M "o:open" M "c:close" M "b:blank"
M "s:string" M "f:fill" M "i:incr" M "n:seq"))))
--- 1243,1251 ----
(defun cua-help-for-rectangle (&optional help)
(interactive)
(let ((M (if cua-use-hyper-key " H-" " M-")))
! (message
(concat (if help "C-?:help" "")
! M "p:pad" M "o:open" M "c:close" M "b:blank"
M "s:string" M "f:fill" M "i:incr" M "n:seq"))))
***************
*** 1273,1279 ****
(cua--rectangle-bot t)
(cua--rectangle-top t))
(if (cua--rectangle-padding)
! (setq unread-command-events
(cons (if cua-use-hyper-key ?\H-P ?\M-P)
unread-command-events)))))
(if cua--rectangle
(if (and mark-active
--- 1273,1279 ----
(cua--rectangle-bot t)
(cua--rectangle-top t))
(if (cua--rectangle-padding)
! (setq unread-command-events
(cons (if cua-use-hyper-key ?\H-P ?\M-P)
unread-command-events)))))
(if cua--rectangle
(if (and mark-active
***************
*** 1333,1339 ****
(define-key cua--rectangle-keymap [remap backward-delete-char-untabify]
'cua-delete-char-rectangle)
(define-key cua--rectangle-keymap [remap self-insert-command]
'cua-insert-char-rectangle)
(define-key cua--rectangle-keymap [remap self-insert-iso]
'cua-insert-char-rectangle)
!
;; Catch self-inserting characters which are "stolen" by other modes
(define-key cua--rectangle-keymap [t]
'(menu-item "sic" cua-insert-char-rectangle :filter
cua--self-insert-char-p))
--- 1333,1339 ----
(define-key cua--rectangle-keymap [remap backward-delete-char-untabify]
'cua-delete-char-rectangle)
(define-key cua--rectangle-keymap [remap self-insert-command]
'cua-insert-char-rectangle)
(define-key cua--rectangle-keymap [remap self-insert-iso]
'cua-insert-char-rectangle)
!
;; Catch self-inserting characters which are "stolen" by other modes
(define-key cua--rectangle-keymap [t]
'(menu-item "sic" cua-insert-char-rectangle :filter
cua--self-insert-char-p))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/emulation/cua-rect.el,
Miles Bader <=