emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: magic-mode-alist gets in the way


From: Richard Stallman
Subject: Re: magic-mode-alist gets in the way
Date: Tue, 04 Jan 2005 22:31:11 -0500

    This got me thinking about how things should ideally work, regardless of
    backward compatibility, and it seems that it would be good to add an layer
    of indirection.  Basically I'd want auto-mode-alist and magic-mode-alist to
    specify not major modes but "Content-Types" and then have another variable
    map "Content-Types" to major modes.

There's nothing wrong with that idea, but I don't think we need the
extra level of complexity.  And it is better to avoid any complexity
that we don't really need.

    For Perl and TeX modes, the mapping from "Content-Type" to major mode is
    currently done via the `perl-mode' and `tex-mode' function cells which can
    either point to resp. Perl or CPerl modes, or builtin TeX or AUCTeX modes.

Yes, exactly.  This is the low-cost way to do it.  It is a little more
complex in those cases where there is a choice of modes, and simpler
in the ordinary case.

Given the rarity of such choices, I think this low-cost approach is
the better one.




reply via email to

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