Subject: Re: bug#4896: Doc-view-mode with View-mode

From: Juri Linkov <[email-masked]>
Date: Thu, 04 Feb 2010 21:45:04 +0200

>>>> mode-class=special already doesn't disable view-mode when the ps/pdf/dvi
>>>> document is visited as text because in this case the major mode is not
>>>> doc-view-mode.
>>> Fair enough, go for it,
>> Do you mean putting mode-class=special on `doc-view-mode'?
>
> Yes.

Actually the same problem exists also for `image-mode'.  Visiting an image
from an archive activates `view-mode'.  This causes incorrect image browsing
that uses view-mode scrolling commands instead of image scrolling commands.

Maybe `image-mode' should have the property mode-class=special as well?

=== modified file 'lisp/image-mode.el'
--- lisp/image-mode.el	2010-01-13 08:35:10 +0000
+++ lisp/image-mode.el	2010-02-04 19:44:42 +0000
@@ -317,6 +317,8 @@ (defvar image-minor-mode-map
 
 (defvar bookmark-make-record-function)
 
+(put 'image-mode 'mode-class 'special)
+
 ;;;###autoload
 (defun image-mode ()
   "Major mode for image files.

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