Subject: bug#4896: DocView: Continuous mode

From: Juri Linkov <[email-masked]>
Date: Sun, 29 Nov 2009 00:52:57 +0200

I tried to add a menu item for `doc-view-continuous-mode' with
the following patch, but it doesn't look nice since currently
`doc-view-continuous-mode' is a variable.

If there are problems with that, maybe we should create a minor mode?
However, Continuous mode as a minor mode would complicate interactions
with another minor mode `doc-view-minor-mode' with questions like
should `C-c C-c' disable `doc-view-continuous-mode' and should another
`C-c C-c' re-enable it, and so on?

Index: lisp/doc-view.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/doc-view.el,v
retrieving revision 1.92
diff -u -r1.92 doc-view.el
--- lisp/doc-view.el	25 Nov 2009 17:21:15 -0000	1.92
+++ lisp/doc-view.el	28 Nov 2009 22:51:02 -0000
@@ -332,13 +332,18 @@
 (easy-menu-define doc-view-menu doc-view-mode-map
   "Menu for Doc View mode."
   '("DocView"
+    ["Toggle display"		doc-view-toggle-display]
+    ["Continuous mode"		(setq doc-view-continuous-mode
+				      (not doc-view-continuous-mode))
+     :style toggle
+     :selected doc-view-continuous-mode]
+    "---"
     ["Set Slice"		doc-view-set-slice-using-mouse]
     ["Set Slice (manual)"	doc-view-set-slice]
     ["Reset Slice"		doc-view-reset-slice]
     "---"
     ["Search"			doc-view-search]
     ["Search Backwards"         doc-view-search-backward]
-    ["Toggle display"		doc-view-toggle-display]
     ))
 
 (defvar doc-view-minor-mode-map

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