emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 6ccc3d4149 03/11: Remove Emacs 24.3 compat code


From: Tassilo Horn
Subject: [elpa] externals/auctex 6ccc3d4149 03/11: Remove Emacs 24.3 compat code
Date: Tue, 31 Jan 2023 10:41:26 -0500 (EST)

branch: externals/auctex
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 5c3279569c..e26f478c93 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]