# HG changeset patch # User Richard M. Stallman # Date 1107019599 0 # Node ID b2ab001718c652b889a29124cd14cfa1c2d3a89f # Parent ec7c04e04f710be0b410c42a1baecf5608aaff95 (delete-rectangle-line, delete-extract-rectangle-line) (open-rectangle, delete-whitespace-rectangle-line) (clear-rectangle-line): If FILL, pass t instead of FILL for move-to-column's 3nd arg. diff -r ec7c04e04f71 -r b2ab001718c6 lisp/rect.el --- a/lisp/rect.el Sat Jan 29 17:24:41 2005 +0000 +++ b/lisp/rect.el Sat Jan 29 17:26:39 2005 +0000 @@ -127,14 +127,14 @@ )) (defun delete-rectangle-line (startcol endcol fill) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (when (= (move-to-column startcol (if fill t 'coerce)) startcol) (delete-region (point) (progn (move-to-column endcol 'coerce) (point))))) (defun delete-extract-rectangle-line (startcol endcol lines fill) (let ((pt (point-at-eol))) - (if (< (move-to-column startcol (or fill 'coerce)) startcol) + (if (< (move-to-column startcol (if fill t 'coerce)) startcol) (setcdr lines (cons (spaces-string (- endcol startcol)) (cdr lines))) ;; else @@ -284,13 +284,13 @@ (goto-char start)) (defun open-rectangle-line (startcol endcol fill) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (when (= (move-to-column startcol (if fill t 'coerce)) startcol) (unless (and (not fill) (= (point) (point-at-eol))) (indent-to endcol)))) (defun delete-whitespace-rectangle-line (startcol endcol fill) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (when (= (move-to-column startcol (if fill t 'coerce)) startcol) (unless (= (point) (point-at-eol)) (delete-region (point) (progn (skip-syntax-forward " ") (point)))))) @@ -371,7 +371,7 @@ (defun clear-rectangle-line (startcol endcol fill) (let ((pt (point-at-eol))) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (when (= (move-to-column startcol (if fill t 'coerce)) startcol) (if (and (not fill) (<= (save-excursion (goto-char pt) (current-column)) endcol)) (delete-region (point) pt)