summaryrefslogtreecommitdiff
path: root/lisp/rect.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2005-01-29 17:26:39 +0000
committerRichard M. Stallman <rms@gnu.org>2005-01-29 17:26:39 +0000
commitb29b5c248bf4c9114c16826f3c5e9f4b1033b5d9 (patch)
tree5219e34f549314d026e9411cccc9731c6f4b13ef /lisp/rect.el
parenta7fe694c133749bc7f736fcd078a9f33fa1b4287 (diff)
downloademacs-b29b5c248bf4c9114c16826f3c5e9f4b1033b5d9.tar.gz
(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.
Diffstat (limited to 'lisp/rect.el')
-rw-r--r--lisp/rect.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/rect.el b/lisp/rect.el
index 6d9cd6a2aaa..e53198bc753 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -127,14 +127,14 @@ the function is called."
))
(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 @@ on the right side of the rectangle."
(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 @@ rectangle which were empty."
(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)