Commit 2805ba19 authored by Christopher Schmidt's avatar Christopher Schmidt

* etc/NEWS: Mention nil `calendar-mode-line-format' will not modify

the mode line of the calendar buffer.
* lisp/calendar/calendar.el (calendar-update-mode-line):
Do not overwrite mode-line-format if calendar-mode-line-format is nil.
(Bug#18467)
parent 85b3d352
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).
......
......@@ -127,6 +127,9 @@ appending FUN to `minibuffer-setup-hook'.
*** 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.
......
......@@ -1804,14 +1804,18 @@ is COMMAND's keybinding, STRING describes the binding."
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
\"\"
......@@ -1889,7 +1893,8 @@ the STRINGS are just concatenated and the result truncated."
(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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment