emacs-devel
[Top][All Lists]
Advanced

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

Re: Putting auto-image-file-mode in Options menu


From: Juri Linkov
Subject: Re: Putting auto-image-file-mode in Options menu
Date: Wed, 23 Mar 2005 22:48:54 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux)

> So I think you should leave the function `image-mode' unchanged
> and define a new function `image-mode-maybe' which does the new job.
> Then the entries in auto-mode-alist can call `image-mode-maybe'
> and `image-mode-maybe' can conditionally call `image-mode'.
>
> Want to try it that way?

I don't like this solution because it is too ad-hoc.
How about the following?

Currently the first line of the file can specify several modes:

     -*- mode: MODE-NAME; mode: MINOR-MODE-NAME;  ... -*-

But why can't `auto-mode-alist' allow to do the same?
If `auto-mode-alist' allowed to put a list of modes instead
of one mode then the solution would be simple:

(push '("\\.png\\'" . image-mode) auto-mode-alist)
(push '("\\.xbm\\'" (c-mode image-minor-mode)) auto-mode-alist)

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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