emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 397e316: Add option `calendar-weekend-days'


From: Ingo Lohmar
Subject: [Emacs-diffs] master 397e316: Add option `calendar-weekend-days'
Date: Sun, 02 Aug 2015 15:30:51 +0000

branch: master
commit 397e316b28f74d4b96ccb86203a3996fdd4755f9
Author: Ingo Lohmar <address@hidden>
Commit: Ingo Lohmar <address@hidden>

    Add option `calendar-weekend-days'
    
    Previously, the face `calendar-weekend-header' was invariably applied to
    Sundays and Saturdays, although weekend days differ by region/culture.
    Making the days freely customizable, independent of
    `calendar-week-start-day', should cover all possible scenarios.
---
 ChangeLog.2               |    6 ++++++
 lisp/calendar/calendar.el |   12 +++++++++++-
 2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/ChangeLog.2 b/ChangeLog.2
index fcaff39..cd10de2 100644
--- a/ChangeLog.2
+++ b/ChangeLog.2
@@ -1,3 +1,9 @@
+2015-08-02  Ingo Lohmar  <address@hidden>
+
+       Add option `calendar-weekend-days'
+       * lisp/calendar/calendar.el (calendar-generate-month): New
+       variable calendar-weekend-days to fontify day headers correctly.
+
 2015-08-02  Paul Eggert  <address@hidden>
 
        Substitute some customization etc. doc strings
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index fd2580e..078da3d 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -190,6 +190,16 @@ movement commands will not work correctly."
          (calendar-redraw))
   :group 'calendar)
 
+(defcustom calendar-weekend-days '(0 6)
+  "Days of the week considered weekend days.
+0 means Sunday, 1 means Monday, and so on.
+
+Determines which day headers are fontified with
+`calendar-weekend-header'."
+  :type '(repeat integer)
+  :version "25.1"
+  :group 'calendar)
+
 (defcustom calendar-view-diary-initially-flag nil
   "Non-nil means display current date's diary entries on entry to calendar.
 The diary is displayed in another window when the calendar is first displayed,
@@ -1454,7 +1464,7 @@ line."
      (insert
       (truncate-string-to-width
        (propertize (calendar-day-name j 'header t)
-                   'font-lock-face (if (memq j '(0 6))
+                   'font-lock-face (if (memq j calendar-weekend-days)
                                        'calendar-weekend-header
                                      'calendar-weekday-header))
        calendar-day-header-width nil ?\s)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]