127 |
)) |
)) |
128 |
|
|
129 |
(defun delete-rectangle-line (startcol endcol fill) |
(defun delete-rectangle-line (startcol endcol fill) |
130 |
(when (= (move-to-column startcol (or fill 'coerce)) startcol) |
(when (= (move-to-column startcol (if fill t 'coerce)) startcol) |
131 |
(delete-region (point) |
(delete-region (point) |
132 |
(progn (move-to-column endcol 'coerce) |
(progn (move-to-column endcol 'coerce) |
133 |
(point))))) |
(point))))) |
134 |
|
|
135 |
(defun delete-extract-rectangle-line (startcol endcol lines fill) |
(defun delete-extract-rectangle-line (startcol endcol lines fill) |
136 |
(let ((pt (point-at-eol))) |
(let ((pt (point-at-eol))) |
137 |
(if (< (move-to-column startcol (or fill 'coerce)) startcol) |
(if (< (move-to-column startcol (if fill t 'coerce)) startcol) |
138 |
(setcdr lines (cons (spaces-string (- endcol startcol)) |
(setcdr lines (cons (spaces-string (- endcol startcol)) |
139 |
(cdr lines))) |
(cdr lines))) |
140 |
;; else |
;; else |
284 |
(goto-char start)) |
(goto-char start)) |
285 |
|
|
286 |
(defun open-rectangle-line (startcol endcol fill) |
(defun open-rectangle-line (startcol endcol fill) |
287 |
(when (= (move-to-column startcol (or fill 'coerce)) startcol) |
(when (= (move-to-column startcol (if fill t 'coerce)) startcol) |
288 |
(unless (and (not fill) |
(unless (and (not fill) |
289 |
(= (point) (point-at-eol))) |
(= (point) (point-at-eol))) |
290 |
(indent-to endcol)))) |
(indent-to endcol)))) |
291 |
|
|
292 |
(defun delete-whitespace-rectangle-line (startcol endcol fill) |
(defun delete-whitespace-rectangle-line (startcol endcol fill) |
293 |
(when (= (move-to-column startcol (or fill 'coerce)) startcol) |
(when (= (move-to-column startcol (if fill t 'coerce)) startcol) |
294 |
(unless (= (point) (point-at-eol)) |
(unless (= (point) (point-at-eol)) |
295 |
(delete-region (point) (progn (skip-syntax-forward " ") (point)))))) |
(delete-region (point) (progn (skip-syntax-forward " ") (point)))))) |
296 |
|
|
371 |
|
|
372 |
(defun clear-rectangle-line (startcol endcol fill) |
(defun clear-rectangle-line (startcol endcol fill) |
373 |
(let ((pt (point-at-eol))) |
(let ((pt (point-at-eol))) |
374 |
(when (= (move-to-column startcol (or fill 'coerce)) startcol) |
(when (= (move-to-column startcol (if fill t 'coerce)) startcol) |
375 |
(if (and (not fill) |
(if (and (not fill) |
376 |
(<= (save-excursion (goto-char pt) (current-column)) endcol)) |
(<= (save-excursion (goto-char pt) (current-column)) endcol)) |
377 |
(delete-region (point) pt) |
(delete-region (point) pt) |