[PLUG] Emacs & word wrap

Russell Senior seniorr at aracnet.com
Sat Aug 31 07:18:23 UTC 2002


>>>>> "Russell" == Russell Senior <seniorr at aracnet.com> writes:

>>>>> "Jason" == Jason Dagit <dagit at engr.orst.edu> writes:
Jason> Is there a way I could pass a variable on the command line?
Jason> Then just enable auto-fill-mode if the var is set?  Since pine
Jason> starts a new instance of emacs for every edit, then that might
Jason> work really well.

Russell> It looks like this will work for you:

Russell>   emacs --eval "(setq default-major-mode 'text-mode)"

Hmm.  Actually, that didn't work when I just tested it.  What did, for
me, was making a file, say, special.el:

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

and then using:

  emacs -l special.el message-file

You can even byte-compile the special.el into special.elc, though it
isn't clear to me why you don't want to just put the two lines in your
.emacs file.

-- 
Russell Senior         ``The two chiefs turned to each other.        
seniorr at aracnet.com      Bellison uncorked a flood of horrible       
                         profanity, which, translated meant, `This is
                         extremely unusual.' ''                      




More information about the PLUG mailing list