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

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

mode-aware fill-column?


From: mike hardy
Subject: mode-aware fill-column?
Date: Mon, 16 Sep 2002 20:45:40 GMT
User-agent: Gnus v5.9.0/Emacs 21.0.102

Howdy -

Using Emacs for personal editing I like text columns to wrap around 84
chars.  But (some) ppl prefer to see 72-ish for posting to Usenet.  I'd
like to accomodate them if there is some automatic way of changing
fill-column's value between the two.  Say somehow using ~/.gnus.el to
change it to 72 but all other times use 84 (and when exiting Gnus it
reverts to 84 automatically)?  Or maybe only use 84 when a buffer causes
text-mode to start and at all other times use 72?  Is this something I can
use ~/.gnus.el to change?
    
In poking around Info I see "set-fill-column" but I don't know anything
about using LISP to detect the mode, execute "*fill*", etc., when I visit
a buffer.  It looks like I could just use "set-fill-column" when entering
text-mode I could leave the fill* default at 72 and change it to 84 for
text-mode (which Info intimates would be good only while in text-mode?).
But I don't know how to pass a value to a function (or invoke the
function) upon starting text-mode.

This is what I'm using right now if it matters (~/.emacs):

(setq-default major-mode 'text-mode)
;; turn on auto-fill:
(add-hook 'text-mode-hook 'auto-fill-mode)
(setq-default fill-column 74)
;(setq-default fill-column 82)


Thanks...

Mike
-- 



------------------------
address@hidden@yahoo.com

  Help Wanted: Psychic.  You know where to apply.











reply via email to

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