New proposed function doesn't do what I want
Rodney Sparapani
rsparapa at post.its.mcw.edu
Sat Aug 14 00:13:43 CEST 2004
Does anyone know why this function doesn't quite work? I want to change all
multiple blank lines into one blank line.
(defun ess-delete-blank-lines ()
"Convert 2 or more lines of white space into one. This function
works as you might expect, except that it must be terminated by C-g
for some reason and it also removes single blank lines?!?"
(interactive)
(save-excursion
(goto-char (point-min))
(save-match-data
(while (search-forward-regexp "^[ \t]*$" nil 'eof 2)
(delete-blank-lines)))))
Rodney Sparapani Medical College of Wisconsin
Sr. Biostatistician Patient Care & Outcomes Research
rsparapa at mcw.edu http://www.mcw.edu/pcor
Was 'Name That Tune' rigged? WWLD -- What Would Lombardi Do
More information about the ESS-help
mailing list