X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Frect.el;h=28f054913d1fe1ba32bd1b394fa776290601c8da;hb=8dff7c4723995082eae04a1f325c9407ea8a7e46;hp=2393182e6563d7e0ba02cb6e1f8cb27f8d47291a;hpb=2fd9701a4f902054649dde9143a3f77809afee8f;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/rect.el b/lisp/rect.el index 2393182..28f0549 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -201,7 +201,7 @@ deleted." (goto-char start) (while (search-forward "\t" end t) (let ((width (- (current-column) - (save-excursion (forward-char -1) + (save-excursion (backward-char 1) (current-column))))) (setq line (concat (substring line 0 (- (point) end 1)) (spaces-string width) @@ -273,12 +273,10 @@ and point is at the lower right corner." (defun open-rectangle-line (startcol endcol fill) - (let (spaces) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) - (unless (and (not fill) - (= (point) (point-at-eol))) - (indent-to endcol))) - )) + (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (unless (and (not fill) + (= (point) (point-at-eol))) + (indent-to endcol)))) ;;;###autoload (defun open-rectangle (start end &optional fill) @@ -308,9 +306,11 @@ Otherwise this command does not delete or overwrite any existing text. When called from a program, the rectangle's corners are START and END." (interactive "*r\nsString rectangle: ") + (defvar pending-delete-mode) (apply-on-rectangle 'string-rectangle-line start end string (and (boundp 'pending-delete-mode) pending-delete-mode))) +;;;###autoload (defun replace-rectangle (start end string) "Like `string-rectangle', but unconditionally replace the original region, as if `pending-delete-mode' were active."