+2014-09-13 Christopher Schmidt <ch@ristopher.com>
+
+ * NEWS: Mention nil `calendar-mode-line-format' will not modify
+ the mode line of the calendar buffer. (Bug#18467)
+
2014-09-06 Leo Liu <sdl.web@gmail.com>
* NEWS: Mention vector qpattern for pcase. (Bug#18327).
*** Calendar can list and mark diary entries with Chinese dates.
See `diary-chinese-list-entries' and `diary-chinese-mark-entries'.
+*** The mode line of the calendar buffer will not be modified if
+`calendar-mode-line-format' is nil.
+
** New ERT function `ert-summarize-tests-batch-and-exit'.
---
+2014-09-13 Christopher Schmidt <ch@ristopher.com>
+
+ * calendar/calendar.el (calendar-update-mode-line):
+ Do not overwrite mode-line-format if calendar-mode-line-format is
+ nil. (Bug#18467)
+
2014-09-13 Leo Liu <sdl.web@gmail.com>
* emacs-lisp/pcase.el (pcase--dontwarn-upats): New var.
nil "today"))
'(calendar-date-string (calendar-current-date) t)
(calendar-mode-line-entry 'calendar-scroll-left "next month" ">"))
- "The mode line of the calendar buffer.
+ "If non-nil, the mode line of the calendar buffer.
This is a list of items that evaluate to strings. The elements
are evaluated and concatenated, evenly separated by blanks.
During evaluation, the variable `date' is available as the date
nearest the cursor (or today's date if that fails). To update
-the mode-line as the cursor moves, add `calendar-update-mode-line'
-to `calendar-move-hook'. Here is an example that has the Hebrew date,
-the day number/days remaining in the year, and the ISO week/year numbers:
+the mode-line as the cursor moves, add
+`calendar-update-mode-line' to `calendar-move-hook'.
+
+If nil, do not modify the mode line at all.
+
+Here is an example that has the Hebrew date, the day number/days
+remaining in the year, and the ISO week/year numbers:
(list
\"\"
(defun calendar-update-mode-line ()
"Update the calendar mode line with the current date and date style."
- (if (bufferp (get-buffer calendar-buffer))
+ (if (and calendar-mode-line-format
+ (bufferp (get-buffer calendar-buffer)))
(with-current-buffer calendar-buffer
(let ((start (- calendar-left-margin 2))
(date (condition-case nil