From: Lars Ingebrigtsen Date: Tue, 29 Dec 2020 01:01:57 +0000 (+0100) Subject: Allow mixing attributes and comments in the diary file X-Git-Tag: emacs-28.0.90~4521 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=92406b02c6b1ff25102e49f78b0f46a9b143e21b;p=emacs.git 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). --- 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)