[Top][All Lists]

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

RE: Using the same custom file in two different OSes

From: Drew Adams
Subject: RE: Using the same custom file in two different OSes
Date: Sun, 13 Jan 2013 14:18:54 -0800

> I'd like to use the same Emacs custom file in two different OSes:
> MS-Windows and Ubuntu, but I have one problem: I want to define the
> :family property of the `default' and `variable-pitch' faces based on
> the `system-type' (because my favorite family on MS-Windows isn't
> available on Ubuntu and vice-versa), but without having to duplicate
> my custom file (one for each system-type), so that I can tweak my
> customization at any time, in any OS, and get an updated custom file
> that is still valid for both OSes.
> Is there a way to achieve that goal?  If so, how?

With a single `custom-file', using Customize, no, I don't think so.

But you can do it using Lisp, in your init file (~/.emacs).  (Use a separate
`custom-file' for the stuff that Customize manages.  Keep your init file for
Lisp that you manage.)

Try first using Customize on each of the platforms separately, to see what
values it gives you for those faces, for the automatically generated
`custom-set-faces' sexp.

Then remove the settings for those exceptional faces from `custom-file', moving
them to your init file instead and wrapping them with (custom-set-faces ...):

(if (eq system-type 'windows-nt)
    (custom-set-faces ...)
  (custom-set-faces ...))

reply via email to

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