]> git.eshelyaron.com Git - emacs.git/commitdiff
(zone-hiding-modeline): Use mode-line-format.
authorRichard M. Stallman <rms@gnu.org>
Sun, 30 Sep 2007 11:00:54 +0000 (11:00 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 30 Sep 2007 11:00:54 +0000 (11:00 +0000)
lisp/ChangeLog
lisp/play/zone.el

index 53b8b68888bfe698a1fe3cf928f7cb995fdcb4a9..8b6d2f32288343f1c1691c31ebbb7ec9ce688add 100644 (file)
@@ -1,3 +1,7 @@
+2007-09-30  Richard Stallman  <rms@gnu.org>
+
+       * play/zone.el (zone-hiding-modeline): Use mode-line-format.
+
 2007-09-29  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
 
        * term/x-win.el (x-gtk-stock-map): Version is 22.2.
index 15d8e5eeba72d5863d40be12d617b060677360ba..c146f4baa8364143bc899aaf1fcaa4adebbc8cef 100644 (file)
@@ -86,30 +86,10 @@ If nil, don't interrupt for about 1^26 seconds.")
      ,@body))
 
 (defmacro zone-hiding-modeline (&rest body)
-  `(let (bg mode-line-fg mode-line-bg mode-line-box)
-     (unwind-protect
-         (progn
-           (when (and (= 0 (get 'zone 'modeline-hidden-level))
-                      (display-color-p))
-             (setq bg (face-background 'default)
-                   mode-line-box (face-attribute 'mode-line :box)
-                   mode-line-fg (face-attribute 'mode-line :foreground)
-                   mode-line-bg (face-attribute 'mode-line :background))
-             (set-face-attribute 'mode-line nil
-                                 :foreground bg
-                                 :background bg
-                                 :box nil))
-           (put 'zone 'modeline-hidden-level
-                (1+ (get 'zone 'modeline-hidden-level)))
-           ,@body)
-       (put 'zone 'modeline-hidden-level
-            (1- (get 'zone 'modeline-hidden-level)))
-       (when (and (> 1 (get 'zone 'modeline-hidden-level))
-                  mode-line-fg)
-         (set-face-attribute 'mode-line nil
-                             :foreground mode-line-fg
-                             :background mode-line-bg
-                             :box mode-line-box)))))
+  ;; This formerly worked by temporarily altering face `mode-line',
+  ;; which did not even work right, it seems.
+  `(let (mode-line-format)
+     ,@body))
 
 (defun zone-call (program &optional timeout)
   "Call PROGRAM in a zoned way.