[Top][All Lists]

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

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

From: Richard Stallman
Subject: Re: Putting auto-image-file-mode in Options menu
Date: Wed, 23 Mar 2005 01:21:59 -0500

Your code looks good to me, except for one point: every major mode's
symbol name should be a function that *unconditionally* switches to
that mode.  You've set it up so that `image-mode' is a function that
usually switches to Image mode, but not always.  That's not right.

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?

reply via email to

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