bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background mode detection fails with rxvt-xterm, xterm and , konsole


From: Gerd Moellmann
Subject: Re: Background mode detection fails with rxvt-xterm, xterm and , konsole
Date: 25 Oct 2001 15:39:23 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.50

Eli Zaretskii <address@hidden> writes:

> Gerd, it looks like this is due to this change:
> 
>   2001-07-10  Gerd Moellmann  <address@hidden>
> 
>       * startup.el (normal-top-level): Don't operate on the initial
>       frame if we failed to create one.
> 
> That change made the entire block of code which, in particular, 
> looks at $TERM and sets the background mode accordingly--made it 
> conditional on frame-initial-frame being non-nil.  However, AFAICS, at 
> that point frame-initial-frame is _always_ nil, since the code which 
> creates the initial frame did not yet have the opportunity to run (it is 
> run from command-line).  So the the code which detects of xterm and its 
> ilk doesn't get run at all.

Hm, I didn't follow the control flow, but judging from the stuff done
in the `when' like frame-notice-user-settings I believe the frame must
have been created already.  I think the the problem is that the
variable frame-initial-frame is only used in certain cases, for
example when starting on X.  Thus I think the fix should be to let
control flow through when it's not used:

*** startup.el  2001/10/23 12:20:12     1.266
--- startup.el  2001/10/25 13:31:32
***************
*** 485,491 ****
  
        ;; Don't do this if we failed to create the initial frame,
        ;; for instance due to a dense colormap.
!       (when frame-initial-frame
          ;; Modify the initial frame based on what .emacs puts into
          ;; ...-frame-alist.
          (if (fboundp 'frame-notice-user-settings)
--- 485,495 ----
  
        ;; Don't do this if we failed to create the initial frame,
        ;; for instance due to a dense colormap.
!       (when (or frame-initial-frame
!                 ;; If frame-initial-frame has no meaning, do this anyway.
!                 (not (and window-system
!                           (not noninteractive)
!                           (not (eq window-system 'pc)))))
          ;; Modify the initial frame based on what .emacs puts into
          ;; ...-frame-alist.
          (if (fboundp 'frame-notice-user-settings)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]