From: Christopher Schmidt <ch@ristopher.com>
To: 18467@debbugs.gnu.org
Subject: bug#18467: 24.4.50; calendar-update-mode-line: Do not overwrite mode-line-format unconditionally
Date: Sat, 13 Sep 2014 05:48:40 -0400 (EDT) [thread overview]
Message-ID: <874mwbsvf1@ristopher.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 20 bytes --]
severity: wishlist
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 1873 bytes --]
--- lisp/ChangeLog
+++ lisp/ChangeLog
@@ -1,3 +1,9 @@
+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##)
+
2014-09-13 Eli Zaretskii <eliz@gnu.org>
* mail/rmailmm.el (rmail-mime-insert-html): Decode the HTML part
--- lisp/calendar/calendar.el
+++ lisp/calendar/calendar.el
@@ -1804,14 +1804,18 @@
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 @@
(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
next reply other threads:[~2014-09-13 9:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-13 9:48 Christopher Schmidt [this message]
2014-09-13 16:42 ` bug#18467: 24.4.50; calendar-update-mode-line: Do not overwrite mode-line-format unconditionally Glenn Morris
2014-09-13 17:54 ` Christopher Schmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874mwbsvf1@ristopher.com \
--to=ch@ristopher.com \
--cc=18467@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).