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

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

[nongnu] elpa/pdf-tools 05c42596a2 07/16: Remove compatibility function


From: ELPA Syncer
Subject: [nongnu] elpa/pdf-tools 05c42596a2 07/16: Remove compatibility function for image-mode-winprops
Date: Tue, 29 Nov 2022 01:59:30 -0500 (EST)

branch: elpa/pdf-tools
commit 05c42596a21fc668eac3b8df4cf6ae2d93bf097c
Author: Vedang Manerikar <ved.manerikar@gmail.com>
Commit: Vedang Manerikar <ved.manerikar@gmail.com>

    Remove compatibility function for image-mode-winprops
    
    Relates to: #26
---
 lisp/pdf-util.el | 47 -----------------------------------------------
 1 file changed, 47 deletions(-)

diff --git a/lisp/pdf-util.el b/lisp/pdf-util.el
index cbfff98f30..e17800ceec 100644
--- a/lisp/pdf-util.el
+++ b/lisp/pdf-util.el
@@ -39,53 +39,6 @@
 
 
 
-;; * ================================================================== *
-;; * Compatibility with older Emacssen (< 25.1)
-;; * ================================================================== *
-
-;; In Emacs 24.3 image-mode-winprops leads to infinite recursion.
-(unless (or (> emacs-major-version 24)
-            (and (= emacs-major-version 24)
-                 (>= emacs-minor-version 4)))
-  (require 'image-mode)
-  (defvar image-mode-winprops-original-function
-    (symbol-function 'image-mode-winprops))
-  (defvar image-mode-winprops-alist)
-  (eval-after-load "image-mode"
-    '(defun image-mode-winprops (&optional window cleanup)
-       (if (not (eq major-mode 'pdf-view-mode))
-           (funcall image-mode-winprops-original-function
-                    window cleanup)
-         (cond ((null window)
-                (setq window
-                      (if (eq (current-buffer) (window-buffer)) 
(selected-window) t)))
-               ((eq window t))
-               ((not (windowp window))
-                (error "Not a window: %s" window)))
-         (when cleanup
-           (setq image-mode-winprops-alist
-                 (delq nil (mapcar (lambda (winprop)
-                                     (let ((w (car-safe winprop)))
-                                       (if (or (not (windowp w)) 
(window-live-p w))
-                                           winprop)))
-                                   image-mode-winprops-alist))))
-         (let ((winprops (assq window image-mode-winprops-alist)))
-           ;; For new windows, set defaults from the latest.
-           (if winprops
-               ;; Move window to front.
-               (setq image-mode-winprops-alist
-                     (cons winprops (delq winprops image-mode-winprops-alist)))
-             (setq winprops (cons window
-                                  (copy-alist (cdar 
image-mode-winprops-alist))))
-             ;; Add winprops before running the hook, to avoid inf-loops if 
the hook
-             ;; triggers window-configuration-change-hook.
-             (setq image-mode-winprops-alist
-                   (cons winprops image-mode-winprops-alist))
-             (run-hook-with-args 'image-mode-new-window-functions winprops))
-           winprops)))))
-
-
-
 ;; * ================================================================== *
 ;; * Transforming coordinates
 ;; * ================================================================== *



reply via email to

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