>From f72775037ecb8ed9dadbe0775e969e90663dd86f Mon Sep 17 00:00:00 2001
From: Vaidheeswaran C <address@hidden>
Date: Sun, 18 Jan 2015 13:29:04 +0530
Subject: [PATCH] Fix page navigation when `doc-view-continuous' is nil.

---
 lisp/doc-view.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 0e63d37..21a0883 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -527,6 +527,7 @@ Typically \"page-%s.png\".")
                  (format doc-view--image-file-pattern page)
                  (doc-view--current-cache-dir))))
       (doc-view-insert-image file :pointer 'arrow)
+      (unless doc-view-continuous (image-bob))
       (when (and (not (file-exists-p file))
                  doc-view--current-converter-processes)
         ;; The PNG file hasn't been generated yet.
@@ -553,7 +554,8 @@ Typically \"page-%s.png\".")
 (defun doc-view-previous-page (&optional arg)
   "Browse ARG pages backward."
   (interactive "p")
-  (doc-view-goto-page (- (doc-view-current-page) (or arg 1))))
+  (doc-view-goto-page (- (doc-view-current-page) (or arg 1)))
+  (unless doc-view-continuous (image-eob)))
 
 (defun doc-view-first-page ()
   "View the first page."
-- 
1.7.2.5