[comp.emacs] Auto fill mode

tiemann@mcc-pp.UUCP (Michael Tiemann) (11/08/86)

My day would go so much more smoothly if I only knew one thing:
how do I make auto-fill the default for my many major modes?
(esp. when I zip from tex-mode to c-mode and back, I get my fill)

Anything you'd like to know in return? How 'bout this: For november, 1986,
Friday the 13th falls on a Thursday. Isn't that lucky?

Michael
tiemann@mcc.com

matt@oddjob.UUCP (Matt Crawford) (11/11/86)

In your article you didn't say which emacs you use.  Assuming
it's the good one, put this into .emacs:

(setq text-mode-hook
      (function
       (lambda nil
	 "Set fill column and turn on auto-fill-mode"
	 (setq fill-column 64)
	 (setq indent-line-function 'indent-relative-maybe)
	 (auto-fill-mode 1)
	 )
       ))
_____________________________________________________
Matt		University	crawford@anl-mcs.arpa
Crawford	of Chicago	ihnp4!oddjob!matt

rusty@weyl.Berkeley.EDU (Rusty Wright) (11/12/86)

Here's what I have in my .emacs file:

	(setq text-mode-hook 'turn-on-auto-fill)

If I want the hook to do more than one thing then I make a function
and stick it in a .el file and autoload it, for example for tex-mode I
have in my .emacs file:

	(setq load-path
	      (append (list (expand-file-name "~/lib/emacs")) load-path))

	(setq tex-mode-hook 'my-tex-mode-hook)
	(autoload 'my-tex-mode-hook "tex-mode-hook")

and ~/lib/emacs/tex-mode-hook.el contains:

	(defun my-tex-mode-hook ()
	  "Do this stuff when in tex-mode."
	  (progn
	    (setq fill-column 70)
	    (turn-on-auto-fill)))

There's probably a less complicated way to do this but I decided a
while ago to keep my .emacs file as small as possible and autoload
as much stuff as possible.

--------------------------------------

	rusty c. wright
	rusty@weyl.berkeley.edu
	ucbvax!weyl!rusty

mg@unirot.UUCP (Mike Gallaher) (11/13/86)

In article <1549@oddjob.UUCP>, matt@oddjob.UUCP (Matt Crawford) writes:
> In your article you didn't say which emacs you use.  Assuming
> it's the good one ...

I take issue with this, sir!  You shouldn't make such statements
without having checked out the latest release of CCA Emacs.

desj@brahms (David desJardins) (11/14/86)

In article <142@unirot.UUCP> mg@unirot.UUCP (Mike Gallaher) writes:
>> In your article you didn't say which emacs you use.  Assuming
>> it's the good one ...
>
>I take issue with this, sir!  You shouldn't make such statements
>without having checked out the latest release of CCA Emacs.

   I can't help but wonder why Mr. Gallaher complained that people
should compare the different version of Emacs, while not giving
us anything to compare to.  It is a fact of life that not many
people are going to go out and buy CCA Emacs (especially if they
have had problems with earlier versions) if they already have
something that is free and that works.
   On the other hand, if you were to respond to articles such as
this one by contributing something useful (i.e., how to turn fill
mode on when in text mode), then you might accomplish the additional
goal of showing us what is good about CCA Emacs.  This seems far
more productive than berating people for preferring the Emacs they
have to the one they don't.

   -- David desJardins

pooh@unirot.UUCP (soggy and hard to light) (11/14/86)

In article <281@cartan.Berkeley.EDU> desj@brahms (David desJardins) writes:
>In article <142@unirot.UUCP> mg@unirot.UUCP (Mike Gallaher) writes:
>>> In your article you didn't say which emacs you use.  Assuming
>>> it's the good one ...
>>
>>I take issue with this, sir!  You shouldn't make such statements
>>without having checked out the latest release of CCA Emacs.
>
>   I can't help but wonder why Mr. Gallaher complained that people
>should compare the different version of Emacs, while not giving
>us anything to compare to.  It is a fact of life that not many
>people are going to go out and buy CCA Emacs (especially if they
>have had problems with earlier versions) if they already have
>something that is free and that works.

Sometimes Mike's sarcasm is so subtle as to be wasted in most
cases.

You see, Mike Gallaher works for UniPress.

Cheers,
Pooh              rutgers!unipress!pooh
                  rutgers!unirot!pooh
                  pooh@aim.rutgers.edu
                       borax.lcs.mit.edu
                       eddie.mit.edu

"Oooof!  Next time I'll write a lighter manual..."

ljp@trwrb.UUCP (Laura J. Pearlman) (11/15/86)

In article <281@cartan.Berkeley.EDU> desj@brahms (David desJardins) writes:
>In article <142@unirot.UUCP> mg@unirot.UUCP (Mike Gallaher) writes:
>>I take issue with this, sir!  You shouldn't make such statements
>>without having checked out the latest release of CCA Emacs.
>   I can't help but wonder why Mr. Gallaher complained that people
>should compare the different version of Emacs, while not giving
>us anything to compare to.

I really don't think it's fair to blame Mike for CCA's policies,
especially if you take into account the fact that he works for
UniPress.  You can try the latest version of UniPress emacs for free
by getting an account on unirot.

		-- Laura Pearlman
		...{ucbvax,hplabs,decvax}!trwrb!ljp

matt@oddjob.UUCP (Matt Crawford) (11/15/86)

In article <142@unirot.UUCP> mg@unirot.UUCP (Mike Gallaher) writes:
>In article <1549@oddjob.UUCP>, matt@oddjob.UUCP (Matt Crawford) writes:
>> In your article you didn't say which emacs you use.  Assuming
>> it's the good one ...
>
>I take issue with this, sir!  You shouldn't make such statements
>without having checked out the latest release of CCA Emacs.

You're right, that was a bit unfair.  I have tried T(W)ENEX,
GosPress, GNU, and one from USENIX that we had to rm because
of legal errors.  Please send me the latest CCA release.

What?  It costs MONEY?  That's strike one.
_____________________________________________________
Matt		University	crawford@anl-mcs.arpa
Crawford	of Chicago	ihnp4!oddjob!matt