> 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/
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel