[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pdf-tools 321e19ed59 08/16: Remove Emacs 24.4 guards for c
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pdf-tools 321e19ed59 08/16: Remove Emacs 24.4 guards for cua-mode |
Date: |
Tue, 29 Nov 2022 01:59:30 -0500 (EST) |
branch: elpa/pdf-tools
commit 321e19ed597483ec4b5bebc2de160ba3803f1a8b
Author: Vedang Manerikar <ved.manerikar@gmail.com>
Commit: Vedang Manerikar <ved.manerikar@gmail.com>
Remove Emacs 24.4 guards for cua-mode
Relates to: #26
---
lisp/pdf-info.el | 4 +++-
lisp/pdf-view.el | 27 +++++++++------------------
2 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/lisp/pdf-info.el b/lisp/pdf-info.el
index 408dd3f54f..40dfc3d17f 100644
--- a/lisp/pdf-info.el
+++ b/lisp/pdf-info.el
@@ -305,7 +305,9 @@ error."
(setq pdf-info--queue (tq-create proc))))
pdf-info--queue)
-(when (< emacs-major-version 27) (advice-add 'tq-process-buffer :around
#'pdf-info--tq-workaround))
+(when (< emacs-major-version 27)
+ (advice-add 'tq-process-buffer :around #'pdf-info--tq-workaround))
+
(defun pdf-info--tq-workaround (orig-fun tq &rest args)
"Fix a bug in trunk where the wrong callback gets called.
diff --git a/lisp/pdf-view.el b/lisp/pdf-view.el
index 21824ad804..981aa1be3a 100644
--- a/lisp/pdf-view.el
+++ b/lisp/pdf-view.el
@@ -374,14 +374,6 @@ PNG images in Emacs buffers."
;; Enable transient-mark-mode, so region deactivation when quitting
;; will work.
(setq-local transient-mark-mode t)
- ;; In Emacs >= 24.4, `cua-copy-region' should have been advised when
- ;; loading pdf-view.el so as to make it work with
- ;; pdf-view-mode. Disable cua-mode if that is not the case.
- ;; 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)
- (version< emacs-version "24.4"))
- (setq-local cua-mode nil))
(add-hook 'window-configuration-change-hook
'pdf-view-redisplay-some-windows nil t)
@@ -403,16 +395,15 @@ PNG images in Emacs buffers."
(pdf-view-check-incompatible-modes buffer)))
(current-buffer)))
-(unless (version< emacs-version "24.4")
- (advice-add 'cua-copy-region
- :before-until
- #'cua-copy-region--pdf-view-advice)
- (defun cua-copy-region--pdf-view-advice (&rest _)
- "If the current buffer is in `pdf-view' mode, call
-`pdf-view-kill-ring-save'."
- (when (eq major-mode 'pdf-view-mode)
- (pdf-view-kill-ring-save)
- t)))
+(advice-add 'cua-copy-region
+ :before-until
+ #'cua-copy-region--pdf-view-advice)
+
+(defun cua-copy-region--pdf-view-advice (&rest _)
+ "If the current buffer is in `pdf-view' mode, call
`pdf-view-kill-ring-save'."
+ (when (eq major-mode 'pdf-view-mode)
+ (pdf-view-kill-ring-save)
+ t))
(defun pdf-view-check-incompatible-modes (&optional buffer)
"Check BUFFER for incompatible modes, maybe issue a warning."
- [nongnu] elpa/pdf-tools 1f91ba8894 09/16: Render crisp images for HiDPI screens by default, (continued)
- [nongnu] elpa/pdf-tools 1f91ba8894 09/16: Render crisp images for HiDPI screens by default, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 365d2d8e8e 03/16: Remove guards in `pdf-virtual` tests and code., ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 19801defb8 10/16: Add support for Alpine Linux to autobuild, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 1885cefc24 16/16: Merge branch 'feature/emacs-26.3', ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 96703b2bb5 14/16: Bump the minimum Emacs version to 26.3! 🎉🤞, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools ce5ed3412d 05/16: Remove macro / function re-definitions, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 05c42596a2 07/16: Remove compatibility function for image-mode-winprops, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 7a51b38310 13/16: Extend docker testing framework to test against Emacs versions, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools bc7c159c48 11/16: Make sure pkg-config is correctly set in autobuild, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 3af6141926 06/16: Remove pdf-util-window-pixel-width, fallback to window-body-width, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools 321e19ed59 08/16: Remove Emacs 24.4 guards for cua-mode,
ELPA Syncer <=
- [nongnu] elpa/pdf-tools e10d9cedad 12/16: Update and cleanup the Install section, ELPA Syncer, 2022/11/29