unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Lute Kamstra <Lute.Kamstra@cwi.nl>
Subject: Re: adding hook to auto-mode-alist load
Date: Fri, 22 Aug 2003 17:57:45 +0200	[thread overview]
Message-ID: <sgdfzjt4rd2.fsf@occarina.pna.cwi.nl> (raw)
In-Reply-To: <yoijlltlsqlj.fsf@frealaf.dd.chalmers.se> (Johan Bockgård's message of "Fri, 22 Aug 2003 16:40:24 +0200")

bojohan+news@dd.chalmers.se (Johan Bockgård) writes:

> AFAICS auto-mode-alist just specifies a function to call. Is there any
> reason the following is not a good idea?
>
> (defun foo ()
>   (paragraph-indent-text-mode)
>   (turn-on-auto-fill))
>
> (setq auto-mode-alist (cons '("\.plan$" . foo) auto-mode-alist))

Apart from the fact that it's better to use 

(add-to-list 'auto-mode-alist '("\.plan$" . foo))

in case you eval your .emacs more than once, this seems like a fine
solution to me.

  Lute.

-- 
(spook) => "supercomputer LABLINK rs9512c"
(insert-file-contents "~/.signature") => (error "`~/.signature' too rude")

  reply	other threads:[~2003-08-22 15:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.634.1061522029.29551.help-gnu-emacs@gnu.org>
2003-08-22  6:41 ` adding hook to auto-mode-alist load Lute Kamstra
2003-08-22 14:40   ` Johan Bockgård
2003-08-22 15:57     ` Lute Kamstra [this message]
2003-08-21 21:09 Todd Wylie

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=sgdfzjt4rd2.fsf@occarina.pna.cwi.nl \
    --to=lute.kamstra@cwi.nl \
    /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).