emacs-devel
[Top][All Lists]
Advanced

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

Re: Weird problem with inital frame sizing


From: Perry E. Metzger
Subject: Re: Weird problem with inital frame sizing
Date: Thu, 13 Sep 2018 15:31:51 -0400

On Thu, 13 Sep 2018 15:23:55 -0400 "Perry E. Metzger"
<address@hidden> wrote:
> > > > IMO fixing this "correctly" is the following: move your
> > > > face&frame settings from ~/.emacs.d/init.el to
> > > > ~/.emacs.d/early-init.el      
>
> > FYI, I did as you suggested, and my initial frame and subsequent
> > frames do not get the change to the font at all now, so this
> > doesn't seem to work. I'm not sure where early-init.el is loaded,
> > or if it is loaded at all.  
> 
> FYI, this is (some) of what I put in early-init.el:
> 
> (if (eq window-system 'x)
>     (progn
>       (menu-bar-mode 0)
>       (set-face-attribute 'default nil
>                           :family "DejaVu Sans Mono" :height 140)
>       (set-face-attribute 'cursor nil
>                           :background "red")
>       (set-face-attribute 'trailing-whitespace nil
>                           :background "pink")
>       (setq default-frame-alist '((scroll-bar-width . 10)))))
> 
> (if window-system
>     (progn
>       (add-to-list 'default-frame-alist
>                    (cons 'height 50))
>       (add-to-list 'default-frame-alist
>                    (cons 'width 80))))

Okay, I think I see a problem here. At the time that early-init.el
runs, "window-system" is set to nil.

I need to condition my init on whether I'm running under X, on a
terminal, or under cocoa ("ns"), so I need to know the value of
window-system when setting things in my init file. (I use a single
init file on many different machines for sanity's sake.)

What should I be doing here? It appears that early-init.el is _too_
early.

Perry
-- 
Perry E. Metzger                address@hidden



reply via email to

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