summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-02-02 10:57:37 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2017-02-02 10:57:37 -0500
commitf5372d411d149e8a34def18074891454ebc47730 (patch)
tree878c67d7395dbed3b803d9c9d5fd0da5ee1e7020
parent46aa9a30095241cabef463fd01f71ce9ee50c4dc (diff)
downloademacs-f5372d411d149e8a34def18074891454ebc47730.tar.gz
* lisp/doc-view.el (doc-view-mode): Don't require a final newline
(doc-view-revert-buffer): Silence overflow warnings.
-rw-r--r--lisp/doc-view.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 2c11cd23a7f..172ea163c18 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -442,6 +442,9 @@ Typically \"page-%s.png\".")
(defun doc-view-revert-buffer (&optional ignore-auto noconfirm)
"Like `revert-buffer', but preserves the buffer's current modes."
(interactive (list (not current-prefix-arg)))
+ (if (< undo-outer-limit (* 2 (buffer-size)))
+ ;; It's normal for this operation to result in a very large undo entry.
+ (setq-local undo-outer-limit (* 2 (buffer-size))))
(cl-labels ((revert ()
(let (revert-buffer-function)
(revert-buffer ignore-auto noconfirm 'preserve-modes))))
@@ -1763,6 +1766,8 @@ toggle between displaying the document or editing it as text.
(unless doc-view-doc-type
(doc-view-set-doc-type))
(doc-view-set-up-single-converter)
+ (unless (memq doc-view-doc-type '(ps))
+ (setq-local require-final-newline nil))
(doc-view-make-safe-dir doc-view-cache-directory)
;; Handle compressed files, remote files, files inside archives