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

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

A better way to factor custom-set-faces


From: Denis Bueno
Subject: A better way to factor custom-set-faces
Date: Wed, 26 Jul 2006 15:44:47 -0400
User-agent: Thunderbird 1.5.0.4 (Macintosh/20060516)

All--

Is there a better way than below [1] to conditionalise my one custom-set-faces 
call?

I use the same .emacs on several machines which are either OS X or Linux machines. Currently I use different fonts on both machines. However, that is the principal difference I'm trying to account for in conditionalising the calls to custom-set-faces.

Is there a better way to accomplish what I'm trying to accomplish?

-Denis

[1]
;; This occurs at the end of my .emacs. Assume any free variable occurring
;; below has been properly defined.
(defvar linux-x-font-string "-*-clean-medium-r-normal--*-120-*-*-*-*-*-*")

(cond ((os-is "linux")
       (set-default-font linux-x-font-string)
       (push `(font . ,linux-x-font-string) default-frame-alist)
       (custom-set-faces
        ;; custom-set-faces was added by Custom.
        ;; If you edit it by hand, you could mess it up, so be careful.
        ;; Your init file should contain only one such instance.
        ;; If there is more than one, they won't work right.
        '(default ((t (:stipple nil :background "black" :foreground "white"
                                :inverse-video nil :box nil
;;                                 :strike-through nil
;;                                 :overline nil :underline nil :slant normal
;;                                 :weight normal :height 100 :width normal
;;                                 :family "courier"
                                )))))
       )
      ((os-is "darwin")
       (push '(background-color . "grey") default-frame-alist)
       (set-background-color "grey")
       (custom-set-faces
        ;; custom-set-faces was added by Custom.
        ;; If you edit it by hand, you could mess it up, so be careful.
        ;; Your init file should contain only one such instance.
        ;; If there is more than one, they won't work right.
`(default ((t (:stipple nil :background "black" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height ,mac-font-height :width condensed :family ,mac-font-family)))) '(highlight ((((class color) (min-colors 88) (background dark)) (:background "navy"))))
        '(slime-display-edit-face ((((class color) (background dark)) nil)))
'(trailing-whitespace ((((class color) (background dark)) (:background "dark slate gray")))))))






reply via email to

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