[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pdf-tools 3af6141926 06/16: Remove pdf-util-window-pixel-w
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pdf-tools 3af6141926 06/16: Remove pdf-util-window-pixel-width, fallback to window-body-width |
Date: |
Tue, 29 Nov 2022 01:59:29 -0500 (EST) |
branch: elpa/pdf-tools
commit 3af61419267d8abc63d86ce7260d0b1e0710a222
Author: Vedang Manerikar <ved.manerikar@gmail.com>
Commit: Vedang Manerikar <ved.manerikar@gmail.com>
Remove pdf-util-window-pixel-width, fallback to window-body-width
`window-body-width` is available for us to use in Emacs 26.3
Relates to: #26
---
lisp/pdf-util.el | 10 ----------
lisp/pdf-view.el | 2 +-
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/lisp/pdf-util.el b/lisp/pdf-util.el
index ebf7ccfba5..cbfff98f30 100644
--- a/lisp/pdf-util.el
+++ b/lisp/pdf-util.el
@@ -43,16 +43,6 @@
;; * Compatibility with older Emacssen (< 25.1)
;; * ================================================================== *
-;; In Emacs 24.3 window-width does not have a PIXELWISE argument.
-(defmacro pdf-util-window-pixel-width (&optional window)
- "Return the width of WINDOW in pixel."
- (if (< (cdr (subr-arity (symbol-function 'window-body-width))) 2)
- (let ((window* (make-symbol "window")))
- `(let ((,window* ,window))
- (* (window-body-width ,window*)
- (frame-char-width (window-frame ,window*)))))
- `(window-body-width ,window t)))
-
;; In Emacs 24.3 image-mode-winprops leads to infinite recursion.
(unless (or (> emacs-major-version 24)
(and (= emacs-major-version 24)
diff --git a/lisp/pdf-view.el b/lisp/pdf-view.el
index 0820e8f3e4..21824ad804 100644
--- a/lisp/pdf-view.el
+++ b/lisp/pdf-view.el
@@ -1135,7 +1135,7 @@ If WINDOW is t, redisplay pages in all windows."
(let* ((pagesize (pdf-cache-pagesize
(or page (pdf-view-current-page window))))
(slice (pdf-view-current-slice window))
- (width-scale (/ (/ (float (pdf-util-window-pixel-width window))
+ (width-scale (/ (/ (float (window-body-width window t))
(or (nth 2 slice) 1.0))
(float (car pagesize))))
(height (- (nth 3 (window-inside-pixel-edges window))
- [nongnu] elpa/pdf-tools 5563ac9114 04/16: Remove bugfix for imenu in Emacs 24.3 and below, (continued)
- [nongnu] elpa/pdf-tools 5563ac9114 04/16: Remove bugfix for imenu in Emacs 24.3 and below, ELPA Syncer, 2022/11/29
- [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 <=
- [nongnu] elpa/pdf-tools 321e19ed59 08/16: Remove Emacs 24.4 guards for cua-mode, ELPA Syncer, 2022/11/29
- [nongnu] elpa/pdf-tools e10d9cedad 12/16: Update and cleanup the Install section, ELPA Syncer, 2022/11/29