[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6ccc3d41: Remove Emacs 24.3 compat code
From: |
Tassilo Horn |
Subject: |
master 6ccc3d41: Remove Emacs 24.3 compat code |
Date: |
Fri, 20 Jan 2023 14:42:03 -0500 (EST) |
branch: master
commit 6ccc3d41495f5d02ba17547709ece2394f4e9bde
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>
Remove Emacs 24.3 compat code
* preview.el.in (preview-get-dpi): Remove Emacs 24.3 compat case
introduced with bug#45596.
---
preview.el.in | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/preview.el.in b/preview.el.in
index 5c327956..e26f478c 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -3628,23 +3628,15 @@ name(\\([^)]+\\))\\)\\|\
(preview-call-hook 'close (car open-data) close-data))))))
(defun preview-get-dpi ()
- ;; TODO: Remove false-case when required emacs version is bumped to
- ;; 24.4 or newer as this is the version where
- ;; `frame-monitor-attributes' has been introduced.
- (if (fboundp 'frame-monitor-attributes)
- (let* ((monitor-attrs (frame-monitor-attributes))
- (mm-dims (cdr (assoc 'mm-size monitor-attrs)))
- (mm-width (nth 0 mm-dims))
- (mm-height (nth 1 mm-dims))
- (pixel-dims (cl-cdddr (assoc 'geometry monitor-attrs)))
- (pixel-width (nth 0 pixel-dims))
- (pixel-height (nth 1 pixel-dims)))
- (cons (/ (* 25.4 pixel-width) mm-width)
- (/ (* 25.4 pixel-height) mm-height)))
- (cons (/ (* 25.4 (display-pixel-width))
- (display-mm-width))
- (/ (* 25.4 (display-pixel-height))
- (display-mm-height)))))
+ (let* ((monitor-attrs (frame-monitor-attributes))
+ (mm-dims (cdr (assoc 'mm-size monitor-attrs)))
+ (mm-width (nth 0 mm-dims))
+ (mm-height (nth 1 mm-dims))
+ (pixel-dims (cl-cdddr (assoc 'geometry monitor-attrs)))
+ (pixel-width (nth 0 pixel-dims))
+ (pixel-height (nth 1 pixel-dims)))
+ (cons (/ (* 25.4 pixel-width) mm-width)
+ (/ (* 25.4 pixel-height) mm-height))))
(defun preview-get-geometry ()
"Transfer display geometry parameters from current display.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 6ccc3d41: Remove Emacs 24.3 compat code,
Tassilo Horn <=