lisp/org.el: Update previews correctly when color chnages.
* lisp/org.el (org-format-latex): When computing a hash that determines if a preview needs to be re-generated, use the actual color of the face rather than just the setting symbol.
This commit is contained in:
parent
31d48755bf
commit
8bdcf51acf
22
lisp/org.el
22
lisp/org.el
|
@ -15980,15 +15980,25 @@ Some of the options can be changed using the variable
|
|||
(fg
|
||||
(let ((color (plist-get org-format-latex-options
|
||||
:foreground)))
|
||||
(if (and forbuffer (eq color 'auto))
|
||||
(face-attribute face :foreground nil 'default)
|
||||
color)))
|
||||
(if forbuffer
|
||||
(cond
|
||||
((eq color 'auto)
|
||||
(face-attribute face :foreground nil 'default))
|
||||
((eq color 'default)
|
||||
(face-attribute 'default :foreground nil))
|
||||
(t color))
|
||||
color)))
|
||||
(bg
|
||||
(let ((color (plist-get org-format-latex-options
|
||||
:background)))
|
||||
(if (and forbuffer (eq color 'auto))
|
||||
(face-attribute face :background nil 'default)
|
||||
color)))
|
||||
(if forbuffer
|
||||
(cond
|
||||
((eq color 'auto)
|
||||
(face-attribute face :background nil 'default))
|
||||
((eq color 'default)
|
||||
(face-attribute 'default :background nil))
|
||||
(t color))
|
||||
color)))
|
||||
(hash (sha1 (prin1-to-string
|
||||
(list org-format-latex-header
|
||||
org-latex-default-packages-alist
|
||||
|
|
Loading…
Reference in New Issue