Subject: Re: bug#5062: 23.1.50; image-toggle-display overwrites nxml-mode local key map

From: Lennart Borgman <[email-masked]>
Date: Mon, 30 Nov 2009 00:16:13 +0100

On Sun, Nov 29, 2009 at 11:08 PM, Juri Linkov <[email-masked]> wrote:
>>
>> Or just define a derived mode that does major-mode + minor-mode and
>> use that in auto-mode-alist?
>
> That's what I did in the previous patch where `image-mode-maybe' is
> a combination of a non-image major mode (`normal-mode' with image-mode
> entries removed from `auto-mode-alist') and `image-minor-mode'.
>
> Or did you mean a joint mode like `c-mode-and-image-minor-mode',
> `nxml-mode-and-image-minor-mode', `ps-mode-and-doc-view-minor-mode'?
> Wouldn't this be too clumsy?

Yes, why would it be too clumsy?

A more flexibel way might be to use define-globalized-minor-mode. The
turn on function there could make any check. It could for example look
in a list similar to auto-mode-alist, but for minor modes.

But maybe that would take too long time?