forked from mirrors/org-mode
org-latex-preview: Fix face selection Emacs 28 bug
* lisp/org-latex-preview.el (org-latex-preview--face-around): On Emacs 28 (and presumably below), should a face with :extend set be identified as appropriate, the overlay may cast a pall (background colour) over the rest of the line. This can be addressed by replacing the use of the default face to normalise display with an anonymous face that inherits from default and has the :extend attribute set. Reported-by: Roshan Shariff <roshan.shariff@gmail.com> Link: https://list.orgmode.org/CAG8iPGxoAD7qmKzDXQ_SRFbmxD7jdM96piCa-dCSCpzae4rCsw@mail.gmail.com
This commit is contained in:
parent
bc2ef6c91d
commit
d4c97fee06
|
@ -538,13 +538,15 @@ Faces in `org-latex-preview--ignored-faces' are ignored."
|
|||
(get-text-property (1- start) 'face))
|
||||
(and (> (point-max) end)
|
||||
(not (eq (char-after end) ?\n))
|
||||
(get-text-property end 'face)))))
|
||||
(get-text-property end 'face))))
|
||||
(normalising-face
|
||||
(if (>= emacs-major-version 29) 'default '(:inherit default :extend t))))
|
||||
(cond
|
||||
((consp face)
|
||||
(nconc (cl-set-difference face org-latex-preview--ignored-faces) (list 'default)))
|
||||
(nconc (cl-set-difference face org-latex-preview--ignored-faces) (list normalising-face)))
|
||||
((and face (not (memq face org-latex-preview--ignored-faces)))
|
||||
(list face 'default))
|
||||
(t 'default))))
|
||||
(list face normalising-face))
|
||||
(t normalising-face))))
|
||||
|
||||
;; Code for `org-latex-preview-auto-mode':
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue