From xemacs-m  Sun Jul 27 19:12:51 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id TAA15723
	for <xemacs-beta@xemacs.org>; Sun, 27 Jul 1997 19:12:50 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.6/8.8.6) id RAA26742;
	Sun, 27 Jul 1997 17:16:41 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: How to determine build-dir within running XEmacs?
References: <rxszprrme68.fsf@ecf.teradyne.com> <199707131143.EAA02550@xemacs.eng.sun.com> <rxsyb6srtji.fsf@tomorrow.ecf.teradyne.com> <rxsvi1wm6ez.fsf@ecf.teradyne.com> <rxsbu3o2hbf.fsf@tomorrow.ecf.teradyne.com>
X-Face: `'%\i;ySOu]g?NlziJSk_$&@]KP`}~PEQPjZ5;nxSaDW_o$4+4%Ab]%Ifw3ZR;7TIT3,O,'
 @2{L;]ox6kc;$_5kU'n**9vFg-]eV~GbxSVCx|(s%uR[],*:^WKmC`B}(;|k9/m]gwt?&`t;^rfCJg
 khHH>pP1W\)xM0U@!FNDD72{3fDP$PkBhx^7Z?-WxH6DbFN:QOnT`llzW}VGdYv;n9lzljQvKTIBhQ
 YuV
X-Attribution: sb
From: SL Baur <steve@xemacs.org>
In-Reply-To: Adrian Aichner's message of "28 Jul 1997 01:42:12 +0200"
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=US-ASCII
Date: 27 Jul 1997 17:16:41 -0700
Message-ID: <m2vi1w6nfa.fsf@altair.xemacs.org>
Lines: 42
X-Mailer: Gnus v5.4.64/XEmacs 20.3(beta16) - "Budapest"

Adrian Aichner <aichner@ecf.teradyne.com> writes:

> (require 'config)

> (find-file config-value-file)

> (maphash (lambda (k v) (insert (format "%s = %s\n" k v))) (config-value-hash-table))

> (gethash 'srcdir (config-value-hash-table))

Yielding the unuseful result srcdir, $srcdir.  I see two places where
srcdir occurs in the config.values file and only the first one is
useful.  Does the following patch to config.el make things work a
little better?  Is this The Right Thing to do?

At least I get "/b/XEmacs/xemacs-20.0" now (which is correct for where 
I'm building).

1997-07-27  SL Baur  <steve@altair.xemacs.org>

	* utils/config.el (config-value-hash-table): Only store the first
	occurrence of a symbol.

Index: lisp/utils/config.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/utils/config.el,v
retrieving revision 1.1
diff -u -r1.1 config.el
--- config.el	1997/07/19 22:19:14	1.1
+++ config.el	1997/07/28 00:11:27
@@ -48,7 +48,10 @@
 	(goto-char (point-min))
 	(condition-case nil
 	    (while t
-	      (puthash (read buf) (read buf) config-value-hash-table))
+	      (let* ((key (read buf))
+		     (value (read buf)))
+		(unless (gethash key config-value-hash-table)
+		  (puthash key value config-value-hash-table))))
 	  (end-of-file nil)))
       (kill-buffer " *Config*")))
   config-value-hash-table)

