367 |
(apply-on-rectangle 'clear-rectangle-line start end fill)) |
(apply-on-rectangle 'clear-rectangle-line start end fill)) |
368 |
|
|
369 |
(defun clear-rectangle-line (startcol endcol fill) |
(defun clear-rectangle-line (startcol endcol fill) |
370 |
(let ((pt (point-at-eol)) |
(let ((pt (point-at-eol))) |
|
spaces) |
|
371 |
(when (= (move-to-column startcol (or fill 'coerce)) startcol) |
(when (= (move-to-column startcol (or fill 'coerce)) startcol) |
372 |
(if (and (not fill) |
(if (and (not fill) |
373 |
(<= (save-excursion (goto-char pt) (current-column)) endcol)) |
(<= (save-excursion (goto-char pt) (current-column)) endcol)) |
375 |
;; else |
;; else |
376 |
(setq pt (point)) |
(setq pt (point)) |
377 |
(move-to-column endcol t) |
(move-to-column endcol t) |
378 |
(setq spaces (- (point) pt)) |
(setq endcol (current-column)) |
379 |
(delete-region pt (point)) |
(delete-region pt (point)) |
380 |
(indent-to (+ (current-column) spaces)))))) |
(indent-to endcol))))) |
381 |
|
|
382 |
(provide 'rect) |
(provide 'rect) |
383 |
|
|