mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Reuse calendar temporary faces
* lisp/calendar/calendar.el (calendar-make-temp-face): Reuse temporary face produced by calendar. (Bug#78036)
This commit is contained in:
parent
98776ebd39
commit
af22c9292d
1 changed files with 8 additions and 6 deletions
|
|
@ -2515,9 +2515,9 @@ ATTRLIST is a list with elements of the form :face face :foreground color."
|
|||
(if (not faceinfo)
|
||||
;; No attributes to apply, so just use an existing-face.
|
||||
face
|
||||
;; FIXME should we be using numbered temp-faces, reusing where poss?
|
||||
;; Compute temp face name.
|
||||
(setq temp-face
|
||||
(make-symbol
|
||||
(intern
|
||||
(concat ":caltemp"
|
||||
(mapconcat (lambda (sym)
|
||||
(cond
|
||||
|
|
@ -2525,10 +2525,12 @@ ATTRLIST is a list with elements of the form :face face :foreground color."
|
|||
((numberp sym) (number-to-string sym))
|
||||
(t sym)))
|
||||
attrlist ""))))
|
||||
(make-face temp-face)
|
||||
(copy-face face temp-face)
|
||||
;; Apply the font aspects.
|
||||
(apply #'set-face-attribute temp-face nil (nreverse faceinfo))
|
||||
;; Create this new face if it does not already exist.
|
||||
(unless (member temp-face (face-list))
|
||||
(make-face temp-face)
|
||||
(copy-face face temp-face)
|
||||
;; Apply the font aspects.
|
||||
(apply #'set-face-attribute temp-face nil (nreverse faceinfo)))
|
||||
temp-face)))
|
||||
|
||||
(defun calendar-mark-visible-date (date &optional mark)
|
||||
|
|
|
|||
Loading…
Reference in a new issue