[Top][All Lists]

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

Re: Trouble setting default font and window size

From: Emanuel Berg
Subject: Re: Trouble setting default font and window size
Date: Thu, 28 Jul 2016 18:01:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

HASM wrote:

> I push this into my xrdb

So as to not confuse the OP, most likely you
mean ~/.Xresources.

>From the command line, data (and changes to it)
can be read (updated) with

    $ xrdb ~/.Xresources

A good way to have this automated every time
X is started is to put it in ~/.xinitrc, as in

Note: xrdb(1) is "X server resource database
      utility" but I always thought of it as
      "X read database".

> -----------------------------------------------------------------
> Emacs*geometry:   100x50
> Emacs.menuBar:              off
> Emacs.toolBar:              off
> Emacs.horizontalScrollBars: off
> Emacs.verticalScrollBars:   off
> Emacs.background:           #304060
> Emacs.foreground:           white
> Emacs.Font: "-adobe-courier-medium-r-normal--20-140-100-100-m-110-iso8859-15"
> -----------------------------------------------------------------

Thank you, that is what I meant. Also, for an
X user, you have good taste in options :)

> (defun hasm-config-frame (&optional frame)
>   (progn
>     (cond (frame (select-frame frame)))
>     (if (equal window-system 'x)
>       (progn
>         (set-foreground-color "white")
>         (set-background-color "#304060")
>         (set-frame-height (selected-frame) 50)
>         (set-frame-width (selected-frame) 100)
>         (set-face-attribute 'fringe nil :background "#304060" :foreground 
> "white")
>         (set-frame-font 
> "-adobe-courier-medium-r-normal--20-140-100-100-m-110-iso8859-15" nil t)
>         (transient-mark-mode 1)
>         (scroll-bar-mode -1)
>         (tool-bar-mode -1)
>         ))
>     (menu-bar-mode -1)))

Again, thanks, this is what I meant with

As for the Elisp, you don't need a `progn'
after `defun', and if you replace `if' with
`when', you get an implicit progn - and you can
do this safely, because you don't have an
"else" clause to your if!

> and one time out of 10 or thereabout, my
> frame doesn't get the correct size.

Hey, aren't computers supposed to
be deterministic?

OK, so it didn't circumvent the problem. But at
least it circumvented the custom interface and
tought us some Elisp in the process - WIN!

underground experts united ....
Emacs Gnus Blogomatic .........
                   - so far: 58 Blogomatic articles -                   

reply via email to

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