How to align the calendar with week number as the intermonth-text

房东的猫 提交于 2019-12-05 02:50:42
lawlist

It's your height settings that are causing the problem. You may wish to try experimenting with the other variables such as: calendar-left-margin, calendar-column-width, calendar-day-header-width, calendar-day-digit-width, calendar-intermonth-header, calendar-intermonth-text.

NOTE:   For anyone wondering how to highlight Saturday instead of Monday, the function calendar-generate-month has a line of code that contains (if (memq i '(0 6)) -- if calendar-week-start-day is changed from 0 to 1, then it would be necessary to alter the above-code from 0 6 to 5 6. Alternatively, the font-lock settings can be trumped by adding new keywords for the days of the week.

(setq calendar-week-start-day 1)

(setq calendar-intermonth-text
      '(propertize
        (format "%2d"
                (car
                 (calendar-iso-from-absolute
                  (calendar-absolute-from-gregorian (list month day year)))))
        'font-lock-face 'font-lock-warning-face))

(setq calendar-intermonth-header
      (propertize "Wk"                  ; or e.g. "KW" in Germany
                  'font-lock-face 'font-lock-keyword-face))


(source: lawlist.com)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!