summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Politz <politza@hochschule-trier.de>2018-11-18 21:45:25 +0100
committerAndreas Politz <politza@hochschule-trier.de>2018-11-18 21:45:25 +0100
commit5f0d71d0ccf301e6d722c5a4a75d921d8bd884e6 (patch)
tree875feaef754d07d9057ed7328219e99be2c9d82a
parent84342e2fec8e4df06d97ca5370043adf1a5a3b4c (diff)
Use a version check instead of testing for functions
-rw-r--r--lisp/pdf-view.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/pdf-view.el b/lisp/pdf-view.el
index 78f8127..11fabc4 100644
--- a/lisp/pdf-view.el
+++ b/lisp/pdf-view.el
@@ -385,9 +385,7 @@ PNG images in Emacs buffers."
;; FIXME: cua-mode is a global minor-mode, but setting cua-mode to
;; nil seems to do the trick.
(when (and (bound-and-true-p cua-mode)
- (not (and (fboundp 'advice-member-p)
- (advice-member-p #'cua-copy-region--pdf-view-advice
- 'cua-copy-region))))
+ (version< emacs-version "24.4"))
(setq-local cua-mode nil))
(add-hook 'window-configuration-change-hook
@@ -412,7 +410,7 @@ PNG images in Emacs buffers."
;; Setup initial page and start display
(pdf-view-goto-page (or (pdf-view-current-page) 1)))
-(when (fboundp 'advice-add)
+(unless (version< emacs-version "24.4")
(defun cua-copy-region--pdf-view-advice (&rest _)
"If current buffer is in `pdf-view' mode, call
`pdf-view-kill-ring-save'."