Access Keys:
Skip to content (Access Key - 0)

How to set Auto Fill Mode by default

If you want Emacs to be in Auto Fill mode every time you use it, then you need to put the following lines into a file named ~/.emacs:

(setq default-major-mode 'text-mode)
(setq text-mode-hook
      '(lambda nil
	 (setq fill-column 72)
	 (auto-fill-mode 1)))

The first line makes Text Mode the default for all files without another defined mode (such as C Mode). (You can leave that line out if you wish.) The other lines make Auto Fill mode the default for all Text Mode buffers, and make the lines break at the 72nd column.

IS&T Contributions

Documentation and information provided by IS&T staff members


Last Modified:

February 11, 2009

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
olc-emacs olc-emacs Delete
emacs emacs Delete
auto auto Delete
fill fill Delete
mode mode Delete
default default Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki