From 92406b02c6b1ff25102e49f78b0f46a9b143e21b Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen <larsi@gnus.org> Date: Tue, 29 Dec 2020 02:01:57 +0100 Subject: [PATCH] Allow mixing attributes and comments in the diary file * lisp/calendar/diary-lib.el (diary-face-attrs): The attributes don't have to be at the end of the line -- there may be ##warntime or other comments (bug#19965). --- lisp/calendar/diary-lib.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index bf1e8ebf9d6..c41f19dd0f3 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -73,18 +73,18 @@ are holidays." ;; follows: the first line matching "^# [tag:value]" defines the value ;; for that particular tag. (defcustom diary-face-attrs - '((" *\\[foreground:\\([-a-z]+\\)\\]$" 1 :foreground string) - (" *\\[background:\\([-a-z]+\\)\\]$" 1 :background string) - (" *\\[width:\\([-a-z]+\\)\\]$" 1 :width symbol) - (" *\\[height:\\([.0-9]+\\)\\]$" 1 :height int) - (" *\\[weight:\\([-a-z]+\\)\\]$" 1 :weight symbol) - (" *\\[slant:\\([-a-z]+\\)\\]$" 1 :slant symbol) - (" *\\[underline:\\([-a-z]+\\)\\]$" 1 :underline stringtnil) - (" *\\[overline:\\([-a-z]+\\)\\]$" 1 :overline stringtnil) - (" *\\[strike-through:\\([-a-z]+\\)\\]$" 1 :strike-through stringtnil) - (" *\\[inverse-video:\\([-a-z]+\\)\\]$" 1 :inverse-video tnil) - (" *\\[face:\\([-0-9a-z]+\\)\\]$" 1 :face string) - (" *\\[font:\\([-a-z0-9]+\\)\\]$" 1 :font string) + '((" *\\[foreground:\\([-a-z]+\\)\\] *" 1 :foreground string) + (" *\\[background:\\([-a-z]+\\)\\] *" 1 :background string) + (" *\\[width:\\([-a-z]+\\)\\] *" 1 :width symbol) + (" *\\[height:\\([.0-9]+\\)\\] *" 1 :height int) + (" *\\[weight:\\([-a-z]+\\)\\] *" 1 :weight symbol) + (" *\\[slant:\\([-a-z]+\\)\\] *" 1 :slant symbol) + (" *\\[underline:\\([-a-z]+\\)\\] *" 1 :underline stringtnil) + (" *\\[overline:\\([-a-z]+\\)\\] *" 1 :overline stringtnil) + (" *\\[strike-through:\\([-a-z]+\\)\\] *" 1 :strike-through stringtnil) + (" *\\[inverse-video:\\([-a-z]+\\)\\] *" 1 :inverse-video tnil) + (" *\\[face:\\([-0-9a-z]+\\)\\] *" 1 :face string) + (" *\\[font:\\([-a-z0-9]+\\)\\] *" 1 :font string) ;; Unsupported. ;;; (" *\\[box:\\([-a-z]+\\)\\]$" 1 :box) ;;; (" *\\[stipple:\\([-a-z]+\\)\\]$" 1 :stipple) -- 2.39.5