From 5f0d71d0ccf301e6d722c5a4a75d921d8bd884e6 Mon Sep 17 00:00:00 2001 From: Andreas Politz Date: Sun, 18 Nov 2018 21:45:25 +0100 Subject: Use a version check instead of testing for functions --- lisp/pdf-view.el | 6 ++---- 1 file 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'." -- cgit v1.0