/[emacs]/emacs/lisp/rect.el
ViewVC logotype

Diff of /emacs/lisp/rect.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.38 by monnier, Sat Nov 17 00:47:42 2001 UTC revision 1.39 by rms, Tue Feb 26 16:05:48 2002 UTC
# Line 367  rectangle which were empty." Line 367  rectangle which were empty."
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))
# Line 376  rectangle which were empty." Line 375  rectangle which were empty."
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    

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26