diff options
author | Glenn Morris <rgm@gnu.org> | 2013-09-17 21:38:49 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-09-17 21:38:49 -0700 |
commit | 2f68e15795ebd53bfa776c2a7b3ee3dc49c774fc (patch) | |
tree | bb642308cf0045a523c0d8b7e5acc9a50ad9a6a4 /lisp/doc-view.el | |
parent | f4a1d572bca6f19bf59a3b333f2e588aaf065463 (diff) | |
download | emacs-2f68e15795ebd53bfa776c2a7b3ee3dc49c774fc.tar.gz |
* doc-view.el (doc-view-mode): Silence --without-x compilation.
Diffstat (limited to 'lisp/doc-view.el')
-rw-r--r-- | lisp/doc-view.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 589a57b64c2..cbf4d0bda31 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -1733,9 +1733,12 @@ toggle between displaying the document or editing it as text. "/" (:eval (number-to-string (doc-view-last-page-number))))) ;; Don't scroll unless the user specifically asked for it. (setq-local auto-hscroll-mode nil) - (setq-local mwheel-scroll-up-function #'doc-view-scroll-up-or-next-page) - (setq-local mwheel-scroll-down-function - #'doc-view-scroll-down-or-previous-page) + (if (boundp 'mwheel-scroll-up-function) ; not --without-x build + (setq-local mwheel-scroll-up-function + #'doc-view-scroll-up-or-next-page)) + (if (boundp 'mwheel-scroll-down-function) + (setq-local mwheel-scroll-down-function + #'doc-view-scroll-down-or-previous-page)) (setq-local cursor-type nil) (use-local-map doc-view-mode-map) (add-hook 'after-revert-hook 'doc-view-reconvert-doc nil t) |