From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Order in which hooks and defaults are applied, especially set-fill-column.
Date: Wed, 03 Dec 2003 11:23:38 -0700 [thread overview]
Message-ID: <3FCE2A2A.8070604@yahoo.com> (raw)
In-Reply-To: W52zb.17472$7c4.146937972@news-text.cableinet.net
Adam wrote:
> My ~/.emacs contains the following:
>
> ...
> ;; AucTeX
> (require 'tex-site)
> (add-to-list 'auto-mode-alist '("\\.tex\\'" . latex-mode))
> ;; auto-fill for certain modes
> (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 'xml-mode-hook 'turn-off-auto-fill)
> (add-hook 'latex-mode-hook (lambda() (set-fill-column 100)))
> ...
>
>
> But when I open a LaTeX file, auto-fill is on and it wraps at 70. HTML
> and XML files both open the way I want (with auto-fill off). Is it
> possible to configure it to run the way I want -- wrapping LaTeX at 100,
> not wrapping HTML and XML, and wrapping everything else at 70?
I don't think the problem is that the hooks are run in the "wrong"
order, but that latex-mode-hook isn't run at all -- otherwise, why would
the default value of fill-column be in effect? (You could test that
with `C-h v fill-column'; if it doesn't say "Local in buffer foo.latex",
it was never set.)
Perhaps the name of the hook is tex-mode-hook, or Tex-mode-hook, or
LaTex-mode-hook.
--
Kevin Rodgers
next prev parent reply other threads:[~2003-12-03 18:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-02 15:21 Order in which hooks and defaults are applied, especially set-fill-column Adam
2003-12-03 18:23 ` Kevin Rodgers [this message]
2003-12-03 20:15 ` Stefan Monnier
2003-12-03 22:17 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FCE2A2A.8070604@yahoo.com \
--to=ihs_4664@yahoo.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.