unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Adam <a24061@void.yahoo.void.com>
Subject: RE: How to use set-fill-column as a hook?
Date: Wed, 11 Dec 2002 19:05:59 GMT	[thread overview]
Message-ID: <r0MJ9.6432$yc2.54128752@news-text.cableinet.net> (raw)
In-Reply-To: mailman.117.1039618386.19936.help-gnu-emacs@gnu.org

On Wednesday 11 December 2002 14:52, Bingham, Jay wrote:

> In my .emacs I have:
> (setq-default fill-column 75)
> followed by:
> (add-hook 'text-mode-hook 'turn-on-auto-fill)
> 
> When I evaluated
> (add-hook 'latex-mode-hook (lambda () (setq fill-column 100)))
> in the scratch buffer then created a temporary buffer and switched to
> latex mode I had no problems the fill column was set to 100.
> You may be right about latex mode running text mode hooks.  If that is
> the case then I would recommend setting the default fill-column to the
> value you want for text-mode and adding hooks for the modes that you
> want to have a different value.

I've now got the following in .emacs:

(setq-default fill-column 70)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
;(add-hook 'latex-mode-hook 'turn-on-auto-fill)
(add-hook 'html-mode-hook 'turn-off-auto-fill)
(add-hook 'latex-mode-hook (lambda() (set-fill-column 100)))
(add-hook 'mail-mode-hook (lambda() (set-fill-column 60)))

When I C-x C-f foo.txt and use C-h v to check fill-column, it says 75 (the 
built-in default, I think)!. When I C-x C-f foo.tex, it's still 75. When I 
C-x m, it changes to 60.

I think my Emacs must be behaving differently from yours! Is that possible?

       reply	other threads:[~2002-12-11 19:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.117.1039618386.19936.help-gnu-emacs@gnu.org>
2002-12-11 19:05 ` Adam [this message]
2002-12-11 14:52 How to use set-fill-column as a hook? Bingham, Jay
     [not found] <mailman.89.1039534939.19936.help-gnu-emacs@gnu.org>
2002-12-11 12:43 ` Adam
  -- strict thread matches above, loose matches on Subject: below --
2002-12-10 15:42 Bingham, Jay
2002-12-10 14:57 Adam
2002-12-10 14:59 ` David Kastrup
2002-12-10 15:27   ` Adam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='r0MJ9.6432$yc2.54128752@news-text.cableinet.net' \
    --to=a24061@void.yahoo.void.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).