[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: files.el

From: Daniel Pfeiffer
Subject: Re: files.el
Date: Wed, 27 Oct 2004 14:51:14 +0200


Juri Linkov <address@hidden> skribis:

> I looked at your changes in files.el and noticed that perhaps you have
> over-optimized the regexps for `metafont-mode' and `metapost-mode':
> -     ("\\.m4\\'" . m4-mode)
> -     ("\\.mc\\'" . m4-mode)
> -     ("\\.mf\\'" . metafont-mode)
> -     ("\\.mp\\'" . metapost-mode)
> +     ("\\.m[4c]\\'" . m4-mode)
> +     ("\\.m[fp]\\'" . metapost-mode)
> Shouldn't .mp and .mf have separate entries?

Gee, my dad would say I have tomatoes on my eyes — of course.

> Also I tried your changes in `set-auto-mode' and it doesn't work on
> `/etc/fonts/fonts.conf': this file is still loaded in Fundamental mode
> instead of XML mode.
> Generally I agree on the new precedence order you implemented
> (i.e. -*- mode tag, interpreter, <?xml, auto-mode-alist).
> But it seems that current implementation doesn't work for xml
> files: it sets `done' to `t' too early, so the following code
>     (and (not done)
>        xml
>        (xml-mode))
> has no chance to call `xml-mode'.

While this is fixed (in my local copy meanwhile also for strip off suffixes
like .orig) I stumbled over a new problem:  when saving under a different
name, the code goes to some length to only respect the file name for
determining the new mode.  This is wrong!  The same heuristic should apply,
save for the fact that we don't call the already active mode again, so as to
preserve minor modes if possible.

If there are no objections I'll change it that way later.

coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

lerne / learn / apprends / lär dig / ucz się    Esperanto:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]