lisp/ChangeLog addition:
2006-07-12 Aidan Kehoe <kehoea(a)parhasard.net>
* loadhist.el (symbol-file):
Use `source-directory,' not `build-root' for the full pathnames of
C files.
* loadup.el:
* update-elc.el:
Rename `build-root', `source-root' to `build-directory',
`source-directory' respectively, the latter for compatibility with
the FSF; give them and `source-lisp' docstrings, change the
defvars to defconsts where possible.
* make-docfile.el (build-root): Removed.
* make-docfile.el (build-directory): New.
Rename build-root.
* update-elc.el (build-root): Removed.
* update-elc.el (build-directory): New.
* update-elc.el (source-root): Removed.
* update-elc.el (source-directory): New.
Rename build-root, source-root.
XEmacs Trunk source patch:
Diff command: cvs -q diff -u
Files affected: lisp/update-elc.el lisp/make-docfile.el 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 -u -r1.7 loadhist.el
--- lisp/loadhist.el 2006/04/29 16:15:26 1.7
+++ lisp/loadhist.el 2006/07/11 22:09:16
@@ -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-directory "/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 -u -r1.31 loadup.el
--- lisp/loadup.el 2004/12/27 12:25:14 1.31
+++ lisp/loadup.el 2006/07/11 22:09:17
@@ -47,20 +47,31 @@
(when (fboundp 'error)
(error "loadup.el already loaded!"))
-(defvar running-xemacs t
+(defconst running-xemacs t
"Non-nil when the current emacs is XEmacs.")
+
+;; Can't make this constant for now because it causes an error in
+;; update-elc.el.
+(defvar source-lisp (file-name-directory (expand-file-name
+ (nth 2 command-line-args)))
+ "Root of tree containing the Lisp source code for the current build.
+Differs from `lisp-directory' if this XEmacs has been installed. ")
+
+(defconst build-directory (expand-file-name ".." invocation-directory)
+ "Root of tree containing object files and executables produced by build.
+Differs from `source-directory' if configured with --srcdir option, a practice
+recommended for developers.")
+
+(defconst source-directory (expand-file-name ".." source-lisp)
+ "Root of tree containing source code for the current build.
+Used during loadup and for documenting source of symbols defined in C.")
+
(defvar preloaded-file-list nil
"List of files preloaded into the XEmacs binary image.")
(defvar Installation-string nil
"Description of XEmacs installation.")
-(defvar build-root (expand-file-name ".." invocation-directory))
-(defvar source-lisp (file-name-directory (expand-file-name
- (nth 2 command-line-args))))
-(defvar source-root (expand-file-name ".." source-lisp))
-;(defvar build-lib-src (expand-file-name "lib-src" build-root))
-
;(start-profiling)
(let ((gc-cons-threshold
@@ -88,13 +99,14 @@
;; format-decode without checking if it's defined.
(fset 'format-decode #'(lambda (f l &optional v) l))
(insert-file-contents-internal
- (expand-file-name "Installation" build-root))
+ (expand-file-name "Installation" build-directory))
(fmakunbound 'format-decode)
(prog1 (buffer-substring)
(kill-buffer (current-buffer)))))
(setq load-path (list source-lisp))
- (setq module-load-path (list (expand-file-name "modules" build-root)))
+ (setq module-load-path (list
+ (expand-file-name "modules" build-directory)))
;; message not defined yet ...
(external-debugging-output (format "\nUsing load-path %s" load-path))
@@ -163,7 +175,7 @@
;; appropriate charsets are loaded yet.
(when (and (featurep 'mule)
load-unicode-tables-at-dump-time)
- (let ((data-directory (expand-file-name "etc" source-root)))
+ (let ((data-directory (expand-file-name "etc" source-directory)))
(load-unicode-tables)))
(packages-load-package-dumped-lisps late-package-load-path)
Index: lisp/make-docfile.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/make-docfile.el,v
retrieving revision 1.28
diff -u -u -r1.28 make-docfile.el
--- lisp/make-docfile.el 2004/12/27 12:25:14 1.28
+++ lisp/make-docfile.el 2006/07/11 22:09:17
@@ -45,8 +45,8 @@
(defvar site-file-list nil)
(defvar docfile-out-of-date nil)
-(defvar build-root (expand-file-name ".." invocation-directory))
-(defvar build-lib-src (expand-file-name "lib-src" build-root))
+(defvar build-directory (expand-file-name ".." invocation-directory))
+(defvar build-lib-src (expand-file-name "lib-src" build-directory))
(defvar source-lisp (file-name-directory (expand-file-name
(nth 2 command-line-args))))
(defvar source-src (expand-file-name "../src" source-lisp))
Index: lisp/update-elc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/update-elc.el,v
retrieving revision 1.35
diff -u -u -r1.35 update-elc.el
--- lisp/update-elc.el 2005/02/03 07:11:20 1.35
+++ lisp/update-elc.el 2006/07/11 22:09:19
@@ -79,11 +79,13 @@
; (nthcdr 3 command-line-args))))
-(defvar build-root (expand-file-name ".." invocation-directory))
+(defvar build-directory (expand-file-name ".." invocation-directory))
+
(defvar source-lisp (file-name-directory (expand-file-name
- (nth 2 command-line-args))))
+ (nth 2 command-line-args))))
+
(defvar source-lisp-mule (expand-file-name "mule" source-lisp))
-(defvar source-root (expand-file-name ".." source-lisp))
+(defvar source-directory (expand-file-name ".." source-lisp))
(defvar aa-lisp (expand-file-name "auto-autoloads.el" source-lisp))
(defvar aac-lisp (expand-file-name "auto-autoloads.elc" source-lisp))
(defvar aa-lisp-mule (expand-file-name "auto-autoloads.el" source-lisp-mule))
@@ -165,8 +167,8 @@
(setq exe-target "src/xemacs"
dump-target "src/xemacs.dmp")))
- (setq exe-target (expand-file-name exe-target build-root))
- (setq dump-target (expand-file-name dump-target build-root))
+ (setq exe-target (expand-file-name exe-target build-directory))
+ (setq dump-target (expand-file-name dump-target build-directory))
;; Not currently used.
; (setq dump-target-out-of-date-wrt-exe-target
@@ -186,7 +188,7 @@
preloaded-file-list
packages-hardcoded-lisp)))
- (load (expand-file-name "site-packages" source-root) t t)
+ (load (expand-file-name "site-packages" source-directory) t t)
(setq preloaded-file-list
(append packages-hardcoded-lisp
preloaded-file-list
@@ -272,7 +274,7 @@
(if dump-target-out-of-date-wrt-dump-files
(condition-case nil
(write-region-internal
- "foo" nil (expand-file-name "src/NEEDTODUMP" build-root))
+ "foo" nil (expand-file-name "src/NEEDTODUMP" build-directory))
(file-error nil)))
)
@@ -324,7 +326,7 @@
(list "-f" "batch-byte-compile-one-file"
aa-lisp-mule)))))
(condition-case nil
- (delete-file (expand-file-name "src/REBUILD_AUTOLOADS" build-root))
+ (delete-file (expand-file-name "src/REBUILD_AUTOLOADS" build-directory))
(file-error nil))
(cond ((and (not update-elc-files-to-compile)
(not need-to-rebuild-autoloads)
@@ -342,7 +344,7 @@
;; they may depend on the updated autoloads.)
(condition-case nil
(write-region-internal
- "foo" nil (expand-file-name "src/REBUILD_AUTOLOADS"
build-root))
+ "foo" nil (expand-file-name "src/REBUILD_AUTOLOADS"
build-directory))
(file-error nil))
)
(t
--
Santa Maradona, priez pour moi!
Show replies by date
APPROVE COMMIT
Ar an dara lá déag de mí Iúil, scríobh Aidan Kehoe:
[...]
I’ve committed this patch.
--
Santa Maradona, priez pour moi!