Submitted by Andreas Roehler (not verified) on Sun, 2005/11/20 - 09:51.
an
http://nolan.eakins.net/node/208
Thanks for writing unfill-region. I used it successfully.
However, the function will not work correctly, if there are tabs or spaces at the "empty" line, as it is from time to time the case in text editing.
To preseve the "empty" spaced-or-tabbed line nontheless, I changed
(defun line-empty? ()
"Returns true if the current line is empty."
(eq (line-beginning-position) (line-end-position)))
to
(defun just-spaces-or-empty ()
"Returns true if the current line is empty."
;; (eq (line-beginning-position) (line-end-position)))
(progn (beginning-of-line)
(looking-at "[ \t]*$")))
unfill-region
an
http://nolan.eakins.net/node/208
Thanks for writing unfill-region. I used it successfully.
However, the function will not work correctly, if there are tabs or spaces at the "empty" line, as it is from time to time the case in text editing.
To preseve the "empty" spaced-or-tabbed line nontheless, I changed
(defun line-empty? ()
"Returns true if the current line is empty."
(eq (line-beginning-position) (line-end-position)))
to
(defun just-spaces-or-empty ()
"Returns true if the current line is empty."
;; (eq (line-beginning-position) (line-end-position)))
(progn (beginning-of-line)
(looking-at "[ \t]*$")))
and wrote
(defalias 'line-empty? 'just-spaces-or-empty)
to call the changed resolution.
All the best from Berlin
Andreas Roehler
http://www.sleipnir.netfirms.com