I did a mapatoms to find an appropriate variable by its value when handling
built-in functions in symbol-file; I didn’t quite get back then that
build-root and source-root reflect the corresponding configure settings.
lisp/ChangeLog addition:
2006-07-05 Aidan Kehoe <kehoea(a)parhasard.net>
* loadhist.el (symbol-file):
Use source-root, not build-root when constructing the path of
symbol's C source file.
* loadup.el (build-root):
* loadup.el (source-root):
Document both variables.
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: lisp/loadup.el lisp/loadhist.el
Index: lisp/loadhist.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/loadhist.el,v
retrieving revision 1.7
diff -u -r1.7 loadhist.el
--- lisp/loadhist.el 2006/04/29 16:15:26 1.7
+++ lisp/loadhist.el 2006/07/05 10:35:07
@@ -49,7 +49,7 @@
(and (fboundp sym) (subrp (symbol-function sym))))
(let ((built-in-file (built-in-symbol-file sym)))
(if built-in-file
- (concat build-root "/src/" built-in-file))))))
+ (concat source-root "/src/" built-in-file))))))
(defun feature-symbols (feature)
"Return the file and list of symbols associated with a given FEATURE."
Index: lisp/loadup.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/loadup.el,v
retrieving revision 1.31
diff -u -r1.31 loadup.el
--- lisp/loadup.el 2004/12/27 12:25:14 1.31
+++ lisp/loadup.el 2006/07/05 10:35:07
@@ -55,10 +55,20 @@
(defvar Installation-string nil
"Description of XEmacs installation.")
-(defvar build-root (expand-file-name ".." invocation-directory))
+(defvar build-root (expand-file-name ".." invocation-directory)
+ "Where XEmacs object files and executables are written during the build.
+This will differ from `source-root' if `configure' was run in a different
+directory to the source code, something autoconf supports and the GCC people
+recomment for their project. ")
+
(defvar source-lisp (file-name-directory (expand-file-name
(nth 2 command-line-args))))
-(defvar source-root (expand-file-name ".." source-lisp))
+
+(defvar source-root (expand-file-name ".." source-lisp)
+ "Where the XEmacs source code is stored during the build.
+Used during loadup, and used `symbol-file' when giving the file a built-in
+symbol is defined in. ")
+
;(defvar build-lib-src (expand-file-name "lib-src" build-root))
;(start-profiling)
--
Santa Maradona, priez pour moi!