aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2009-02-11 04:02:16 +0000
committerGlenn Morris <[email protected]>2009-02-11 04:02:16 +0000
commitfa262b58b2c98a6dde1fa540d16f2e381d3d2916 (patch)
treec124e313c3dbd67b5d9049993e9ddaa75455b85d
parent8e87c4267a3ca8c0d8824ef03b5828f480091bbb (diff)
(calendar-window-list): Ignore invisible windows.
(calendar-set-mode-line): Fall back to a default width if we seem to be called from daemon. (Bug#2199)
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/calendar/calendar.el10
2 files changed, 19 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ff1c76ee5b..4149355552 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
+2009-02-11 Glenn Morris <[email protected]>
+
+ * calendar/calendar.el (calendar-window-list): Ignore invisible windows.
+ (calendar-set-mode-line): Fall back to a default width if we seem to be
+ called from daemon. (Bug#2199)
+
+ * mail/rmailkwd.el (rmail-make-label): Doc fix.
+ (rmail-read-label): Add current labels to completion list. (Bug#2222)
+ (rmail-set-label): Use `or'.
+
2009-02-11 Chong Yidong <[email protected]>
* emacs-lisp/find-func.el (find-library-name, find-library): Doc
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index c1cff08939..172a55cfc8 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1723,10 +1723,13 @@ the STRINGS are just concatenated and the result truncated."
"List of all calendar-related windows."
(let ((calendar-buffers (calendar-buffer-list))
list)
+ ;; Using 0 rather than t for last argument - see bug#2199.
+ ;; This is only used with calendar-hide-window, which ignores
+ ;; iconified frames anyway, so could use 'visible rather than 0.
(walk-windows (lambda (w)
(if (memq (window-buffer w) calendar-buffers)
(push w list)))
- nil t)
+ nil 0)
list))
(defun calendar-buffer-list ()
@@ -2461,6 +2464,11 @@ If called by a mouse-event, pops up a menu with the result."
(let* ((edges (window-edges))
;; As per doc of window-width, total visible mode-line length.
(width (- (nth 2 edges) (car edges))))
+ ;; Hack for --daemon. See bug #2199.
+ ;; If no frame exists yet, we have no idea what width to use.
+ (and (= width 10)
+ (not window-system)
+ (setq width (or (getenv "COLUMNS") 80)))
(setq mode-line-format
(if buffer-file-name
`("-" mode-line-modified