help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What's wrong with this seemingly simple function for unwrapping text?


From: Endless Story
Subject: What's wrong with this seemingly simple function for unwrapping text?
Date: 12 Jan 2007 03:00:07 -0800
User-agent: G2/1.0

I like autofill mode, but it has one disadvantage: the filled lines
require unfilling if I want to copy the text over into a Word
processor, e.g. Word or OpenOffice. This can be rather tedious, so I
thought I would write a simple function and put it in my .init file to
make everything easy:

(defun unwrap-text ()
  (interactive)
  (setq fill-column 5000)
  (mark-whole-buffer)
  (fill-region)
  (setq fill-column '70)
)

When the function gets to fill-region, it bombs out, complaining about
'wrong number of variables.'  So my questions are:

1) For any lisp experts, what's going wrong here?
2) Is there some built-in way for doing what I want to do?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]