From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Adam Newsgroups: gmane.emacs.help Subject: RE: How to use set-fill-column as a hook? Date: Wed, 11 Dec 2002 12:43:11 GMT Organization: n/a Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: main.gmane.org 1039610896 25414 80.91.224.249 (11 Dec 2002 12:48:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 11 Dec 2002 12:48:16 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18M6He-0006bi-00 for ; Wed, 11 Dec 2002 13:48:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18M6Eu-0000qi-04 for gnu-help-gnu-emacs@m.gmane.org; Wed, 11 Dec 2002 07:45:24 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!newsfeed.mathworks.com!panix!news.stealth.net!news.stealth.net!gestalt.direcpc.com!cyclone2.usenetserver.com!news.webusenet.com!news-hub.cableinet.net!blueyonder!internal-news-hub.cableinet.net!news-text.cableinet.net.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-NNTP-Posting-Host: 80.194.70.67 Original-X-Complaints-To: abuse@blueyonder.co.uk Original-X-Trace: news-text.cableinet.net 1039610591 80.194.70.67 (Wed, 11 Dec 2002 12:43:11 GMT) Original-NNTP-Posting-Date: Wed, 11 Dec 2002 12:43:11 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:107992 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:4525 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4525 On Tuesday 10 December 2002 15:42, Bingham, Jay wrote: > Try this, it worked for me. > > (add-hook 'latex-mode-hook (lambda () (setq fill-column 100))) > > Any mode that has a mode hook, all that I have seen do, can be set in a > similar manner. Just specify the appropriate mode hook and the value > that you want the fill-column to be for the mode. > Individual mode customizations have to be done with a mode hook because > the variable fill-column becomes buffer local when it is set in any > manner. Since the since the mode hooks get executed each time the mode > in invoked, i.e. each time a buffer is created in that mode or you > change a buffer to that mode. I've tried it but I also have (add-hook 'text-mode-hook 'turn-on-auto-fill) in ~/.emacs, and the value of fill-column inherited from text-mode is overriding the value I'm trying to set for latex-mode. (I think that latex-mode is running its own hooks _then_ the text-mode hooks.) I'd really like to set them differently.