unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Peter Wu" <peterwu@hotmail.com>
Subject: Re: How to configure Emacs to autoload modes?
Date: Fri, 21 Feb 2003 17:50:36 +0800	[thread overview]
Message-ID: <b34srr$1hc9pd$1@ID-117651.news.dfncis.de> (raw)
In-Reply-To: u4r6yotqb.fsf@wanadoo.fr

Lucas wrote:

> Un beau jour, "Peter Wu" <peterwu@hotmail.com> nous a dit:
>
>> I tried to build that support by updating the files.el and loaddefs.el
>> but no luck. I opened the python-mode.el and M-x
>> update-file-autoloads. I saw it wrote the loaddefs.el successfully. If
>> I open that file, I do see the python-mode in it.
>>
>> Also, i tried to edit the files.el file, like this:
>>
>> (defvar auto-mode-alist
>>   (mapc
>>    (lambda (elt)
>>      (cons (purecopy (car elt)) (cdr elt)))
>>    '(("\\.te?xt\\'" . text-mode)
>>      ("\\.c\\'" . c-mode)
>>      ("\\.h\\'" . c-mode)
>>      ("\\.py\\'" . python-mode)
>>
>> Am I on the right track?
>
> I modified that list in my .emacs because I always fear of modifying
> something directly in Emacs, but that should work too. This list is
> huge, BTW ^^.
>
> To do that in Emacs, simply :
> (setq auto-mode-alist (append
>       '(("\\.ext1$" . mode-for-ext1)
>         ("\\.ext2$" . mode-for-ext2)) auto-mode-alist))

Yes. This method works.

> But I'm sure you'll get the same result by editing files.el, with being
> ((((careful)) (to) '(((parenthesis))))) and "strings" that end
> anywhere".

However, it does not work for me after I modified the files.el and
loaddefs.el. What could I have missed? Thanks!


--
Cheers, Peter

  reply	other threads:[~2003-02-21  9:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-21  5:44 How to configure Emacs to autoload modes? Peter Wu
2003-02-21  5:50 ` Lucas
2003-02-21  9:20   ` Peter Wu
2003-02-21  9:42     ` Lucas
2003-02-21  9:50       ` Peter Wu [this message]
2003-02-21  9:58         ` Lucas
2003-02-21 11:35           ` Peter Wu
2003-02-21 11:50             ` Lucas
2003-02-21 17:51         ` Kevin Rodgers
2003-02-21 19:29           ` Lucas
2003-02-24  2:10           ` Peter Wu
2003-02-21 17:56 ` Kai Großjohann
2003-02-21 18:37   ` David Masterson
2003-02-21 20:45     ` Kai Großjohann
2003-02-21 22:09       ` David Masterson
2003-02-21 23:48         ` Stefan Monnier <foo@acm.com>

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='b34srr$1hc9pd$1@ID-117651.news.dfncis.de' \
    --to=peterwu@hotmail.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).