[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Dynamic setting of custom vars?
From: |
Greg Fenton |
Subject: |
Dynamic setting of custom vars? |
Date: |
Tue, 25 Mar 2003 10:59:15 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2; MultiZilla v1.4.0.2) Gecko/20030312 |
I am trying to set som custom vars based on conditions of the
system we are running on.
In my .emacs, I have the following code:
;-----------------------------------------------------------
(cond
((string-match "my-laptop" (downcase (system-name)))
(setq glf-height 60))
((string-match "my-linux-box" (downcase (system-name)))
(setq glf-height 80)))
(custom-set-variables
'(default-frame-alist
(quote ((width . 81) (height . glf-height))))
'(initial-frame-alist
(quote ((width . 81) (height . glf-height))))
)
;-----------------------------------------------------------
However, it appears that the value of glf-height is being ignored
during the creation of the intial frame (trying to create
subsequent frames throws an error "(wrong-type-argument integerp
glf-height)".
I assume I must reference the variable in some other way in the
custom-set-variables or that the value of glf-height is not
visible to the make-frame-command.
Is what I'm doing at all possible? Is there a better way (should
I simply avoid custom-set-variables)?
Thanks in advance,
greg.fenton
- Dynamic setting of custom vars?,
Greg Fenton <=