Skip to content

Commit

Permalink
Fix: create alias for x-gtk-* variables for Emacs >28
Browse files Browse the repository at this point in the history
The x-gtk prefix has been dropped in Emacs 29.
  • Loading branch information
vedang committed Mar 17, 2024
1 parent 93e7492 commit f9ab15e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions lisp/pdf-annot.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
(require 'pdf-info)
(require 'pdf-cache)
(require 'pdf-misc)
(require 'pdf-util)
(require 'facemenu) ;; list-colors-duplicates
(require 'faces) ;; color-values
(require 'org) ;; org-create-formula-image
Expand Down
8 changes: 7 additions & 1 deletion lisp/pdf-util.el
Original file line number Diff line number Diff line change
Expand Up @@ -607,12 +607,18 @@ string."
;; requires us :-(
(defvar pdf-view-midnight-colors)

(when (and (> emacs-major-version 28)
(not (boundp 'x-gtk-use-system-tooltips)))
;; The x-gtk prefix has been dropped Emacs 29
(defvaralias 'x-gtk-use-system-tooltips 'use-system-tooltips))

(defun pdf-util-tooltip-arrow (image-top &optional timeout)
(pdf-util-assert-pdf-window)
(when (floatp image-top)
(setq image-top
(round (* image-top (cdr (pdf-view-image-size))))))
(let* (x-gtk-use-system-tooltips ;allow for display property in tooltip
(let* ((x-gtk-use-system-tooltips nil)
;; ^ allow for display text property in tooltip
(dx (+ (or (car (window-margins)) 0)
(car (window-fringes))))
(dy image-top)
Expand Down

0 comments on commit f9ab15e

Please sign in to comment.