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

From: Stefan Monnier <[email-masked]>
Date: Sun, 29 Nov 2009 10:36:59 -0500

>> Better would be to save the major mode, and then switch to
>> "saved-major-mode + image-minor-mode".  No need to modify anybody's
>> keymap.  And I think that image-minor-mode should only be used while
>> displaying text: basically, image-toggle-display should toggle between
>> image-mode and the other major-mode (complemented with
>> image-minor-mode).
>> That would be cleaner,
> I see now how this is implemented with `doc-view-previous-major-mode'
> in doc-view.  Perhaps we should "sync" this with image-mode to use
> the same logic.

Yes.  Those two modes really need to be made more alike (ideally, they
should be merged, tho there might be some good reasons to keep some of
it separate).

        Stefan