/[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.46 by miles, Mon Sep 1 15:45:14 2003 UTC revision 1.47 by rms, Sat Jan 29 17:26:39 2005 UTC
# Line 127  the function is called." Line 127  the function is called."
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
# Line 284  on the right side of the rectangle." Line 284  on the right side of the rectangle."
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    
# Line 371  rectangle which were empty." Line 371  rectangle which were empty."
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)

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

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