From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Fenton Newsgroups: gmane.emacs.help Subject: Dynamic setting of custom vars? Date: Tue, 25 Mar 2003 10:59:15 -0500 Organization: iAnywhere Solutions Inc. Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1048608941 15834 80.91.224.249 (25 Mar 2003 16:15:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 25 Mar 2003 16:15:41 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 25 17:15:36 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18xr1N-0003qK-00 for ; Tue, 25 Mar 2003 17:11:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18xqvX-00008c-05 for gnu-help-gnu-emacs@m.gmane.org; Tue, 25 Mar 2003 11:05:27 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!worldnet.att.net!4.24.21.153!chcgil2-snh1.gtei.net!mtvwca1-snf1.ops.genuity.net!news.gtei.net!newswest.sybase.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: 172.31.140.220 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2; MultiZilla v1.4.0.2) Gecko/20030312 X-Accept-Language: en-us, en Original-Xref: shelby.stanford.edu gnu.emacs.help:111385 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:7887 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7887 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