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

Reply

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
More information about formatting options

Ad's by Google