]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix jumping to page in DocView's text contents (bug#72275)
authorTassilo Horn <tsdh@gnu.org>
Thu, 25 Jul 2024 06:49:10 +0000 (08:49 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 25 Jul 2024 08:40:40 +0000 (10:40 +0200)
* lisp/doc-view.el (doc-view-open-text): Set page-delimiter to the form
feed character in the text contents buffer (bug#72275).

(cherry picked from commit c6937ef88b19d46342cefc1493a70f21a8993e08)

lisp/doc-view.el

index fbe25d956fe7661d394dac90a2871f8753a73c35..ce505b1996909efe1a456b30b2f24b99872c0c45 100644 (file)
@@ -1779,6 +1779,8 @@ For now these keys are useful:
                 (insert-file-contents txt)
                 (doc-view--text-view-mode)
                 (setq-local doc-view--buffer-file-name dv-bfn)
+                ;; Pages are separated by form feed characters.
+                (setq-local page-delimiter "\f")
                 (set-buffer-modified-p nil)
                 (doc-view-minor-mode)
                 (goto-char (point-min))