[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: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emulation/cua-rect.el |
Date: |
Wed, 29 Jun 2005 21:15:53 -0400 |
Index: emacs/lisp/emulation/cua-rect.el
diff -c emacs/lisp/emulation/cua-rect.el:1.19
emacs/lisp/emulation/cua-rect.el:1.20
*** emacs/lisp/emulation/cua-rect.el:1.19 Mon Jun 6 13:19:15 2005
--- emacs/lisp/emulation/cua-rect.el Thu Jun 30 01:15:52 2005
***************
*** 992,998 ****
(defun cua-do-rectangle-padding ()
(interactive)
(if buffer-read-only
! (message "Cannot do padding in read-only buffer.")
(cua--rectangle-operation nil nil t t t)
(cua--rectangle-set-corners))
(cua--keep-active))
--- 992,998 ----
(defun cua-do-rectangle-padding ()
(interactive)
(if buffer-read-only
! (message "Cannot do padding in read-only buffer")
(cua--rectangle-operation nil nil t t t)
(cua--rectangle-set-corners))
(cua--keep-active))
***************
*** 1098,1111 ****
'(lambda (l r)
(cua--rectangle-right (max l (+ l (length string) -1)))))))
! (defun cua-fill-char-rectangle (ch)
"Replace CUA rectangle contents with CHARACTER."
(interactive "cFill rectangle with character: ")
(cua--rectangle-operation 'clear nil t 1 nil
'(lambda (s e l r)
(delete-region s e)
(move-to-column l t)
! (insert-char ch (- r l)))))
(defun cua-replace-in-rectangle (regexp newtext)
"Replace REGEXP with NEWTEXT in each line of CUA rectangle."
--- 1098,1111 ----
'(lambda (l r)
(cua--rectangle-right (max l (+ l (length string) -1)))))))
! (defun cua-fill-char-rectangle (character)
"Replace CUA rectangle contents with CHARACTER."
(interactive "cFill rectangle with character: ")
(cua--rectangle-operation 'clear nil t 1 nil
'(lambda (s e l r)
(delete-region s e)
(move-to-column l t)
! (insert-char character (- r l)))))
(defun cua-replace-in-rectangle (regexp newtext)
"Replace REGEXP with NEWTEXT in each line of CUA rectangle."
***************
*** 1137,1145 ****
(t nil)))))
(defvar cua--rectangle-seq-format "%d"
! "Last format used by cua-sequence-rectangle.")
! (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
--- 1137,1145 ----
(t nil)))))
(defvar cua--rectangle-seq-format "%d"
! "Last format used by `cua-sequence-rectangle'.")
! (defun cua-sequence-rectangle (first incr format)
"Resequence each line of CUA rectangle starting from FIRST.
The numbers are formatted according to the FORMAT string."
(interactive
***************
*** 1150,1162 ****
(string-to-number
(read-string "Increment: (1) " nil nil "1"))
(read-string (concat "Format: (" cua--rectangle-seq-format ") "))))
! (if (= (length fmt) 0)
! (setq fmt cua--rectangle-seq-format)
! (setq cua--rectangle-seq-format fmt))
(cua--rectangle-operation 'clear nil t 1 nil
'(lambda (s e l r)
(delete-region s e)
! (insert (format fmt first))
(setq first (+ first incr)))))
(defmacro cua--convert-rectangle-as (command tabify)
--- 1150,1162 ----
(string-to-number
(read-string "Increment: (1) " nil nil "1"))
(read-string (concat "Format: (" cua--rectangle-seq-format ") "))))
! (if (= (length format) 0)
! (setq format cua--rectangle-seq-format)
! (setq cua--rectangle-seq-format format))
(cua--rectangle-operation 'clear nil t 1 nil
'(lambda (s e l r)
(delete-region s e)
! (insert (format format first))
(setq first (+ first incr)))))
(defmacro cua--convert-rectangle-as (command tabify)