changeset 97850:da6fd3fcdb25

(mode-line-frame-identification): Fix last change.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 29 Aug 2008 09:01:13 +0000
parents e260797f3170
children fbab7908c69a
files lisp/bindings.el
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/bindings.el	Fri Aug 29 08:41:52 2008 +0000
+++ b/lisp/bindings.el	Fri Aug 29 09:01:13 2008 +0000
@@ -219,14 +219,17 @@
 (defun mode-line-frame-control ()
   "Compute mode-line control for frame identification.
 Value is used for `mode-line-frame-identification', which see."
-  (if (or (null (window-system))
-	  (eq (window-system) 'pc))
+  (if (or (null initial-window-system)
+	  (eq initial-window-system 'pc))
       "-%F  "
     "  "))
 
-(defvar mode-line-frame-identification
-  (list (mode-line-frame-control))
+(defvar mode-line-frame-identification "  "
   "Mode-line control to describe the current frame.")
+;; We need to defer the call to mode-line-frame-control to the time
+;; the mode line is actually displayed.
+(setq mode-line-frame-identification '(:eval (mode-line-frame-control)))
+(put 'mode-line-frame-identification 'risky-local-variable t)
 
 (defvar mode-line-process nil "\
 Mode-line control for displaying info on process status.