diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
commit | 07fcbb558d797272b9f43547da60beda485873a3 (patch) | |
tree | 77d5da14e9f9d9d8b1d877c70c01296fd3893796 /lisp/doc-view.el | |
parent | c9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff) | |
parent | fb81c8c3adf8633f2f617c82f6019aef630860c7 (diff) | |
download | emacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz |
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'lisp/doc-view.el')
-rw-r--r-- | lisp/doc-view.el | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index f6fcfae453e..a0ffcac9f80 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -1439,6 +1439,8 @@ ARGS is a list of image descriptors." (apply #'create-image file doc-view--image-type nil args) (unless (member :width args) (setq args `(,@args :width ,doc-view-image-width))) + (unless (member :transform-smoothing args) + (setq args `(,@args :transform-smoothing t))) (apply #'create-image file doc-view--image-type nil args)))) (slice (doc-view-current-slice)) (img-width (and image (car (image-size image)))) @@ -1800,11 +1802,6 @@ If BACKWARD is non-nil, jump to the previous match." (remove-overlays (point-min) (point-max) 'doc-view t) (if (consp image-mode-winprops-alist) (setq image-mode-winprops-alist nil))) -(defun doc-view-intersection (l1 l2) - (let ((l ())) - (dolist (x l1) (if (memq x l2) (push x l))) - l)) - (defun doc-view-set-doc-type () "Figure out the current document type (`doc-view-doc-type')." (let ((name-types @@ -1839,7 +1836,7 @@ If BACKWARD is non-nil, jump to the previous match." ((looking-at "AT&TFORM") '(djvu)))))) (setq-local doc-view-doc-type - (car (or (doc-view-intersection name-types content-types) + (car (or (nreverse (seq-intersection name-types content-types #'eq)) (when (and name-types content-types) (error "Conflicting types: name says %s but content says %s" name-types content-types)) @@ -1916,6 +1913,11 @@ toggle between displaying the document or editing it as text. (unless (memq doc-view-doc-type '(ps)) (setq-local require-final-newline nil)) + ;; These modes will just display "1", so they're not very useful + ;; in this mode. + (setq-local global-linum-mode nil + display-line-numbers-mode nil) + (doc-view-make-safe-dir doc-view-cache-directory) ;; Handle compressed files, remote files, files inside archives (setq-local doc-view--buffer-file-name @@ -2144,6 +2146,12 @@ See the command `doc-view-mode' for more information on this mode." (add-hook 'bookmark-after-jump-hook show-fn-sym) (bookmark-default-handler bmk))) +;; Obsolete. + +(defun doc-view-intersection (l1 l2) + (declare (obsolete seq-intersection "28.1")) + (nreverse (seq-intersection l1 l2 #'eq))) + (provide 'doc-view) ;; Local Variables: |