User: aidan
Date: 06/07/16 14:24:00
Modified: xemacs/lisp ChangeLog loadhist.el loadup.el make-docfile.el
update-elc.el
Log:
Add docstrings to source-root, build-root, rename them
Revision Changes Path
1.754 +22 -0 XEmacs/xemacs/lisp/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.753
retrieving revision 1.754
diff -u -p -r1.753 -r1.754
--- ChangeLog 2006/07/13 20:45:48 1.753
+++ ChangeLog 2006/07/16 12:23:57 1.754
@@ -1,3 +1,25 @@
+2006-07-16 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.
+
2006-07-13 Aidan Kehoe <kehoea(a)parhasard.net>
* unicode.el (decode-char):
1.8 +1 -1 XEmacs/xemacs/lisp/loadhist.el
Index: loadhist.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/loadhist.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- loadhist.el 2006/04/29 16:15:26 1.7
+++ loadhist.el 2006/07/16 12:23:58 1.8
@@ -49,7 +49,7 @@ This is a file name, or nil if the sourc
(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."
1.32 +22 -10 XEmacs/xemacs/lisp/loadup.el
Index: loadup.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/loadup.el,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -p -r1.31 -r1.32
--- loadup.el 2004/12/27 12:25:14 1.31
+++ loadup.el 2006/07/16 12:23:58 1.32
@@ -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)
1.29 +2 -2 XEmacs/xemacs/lisp/make-docfile.el
Index: make-docfile.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/make-docfile.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -p -r1.28 -r1.29
--- make-docfile.el 2004/12/27 12:25:14 1.28
+++ make-docfile.el 2006/07/16 12:23:58 1.29
@@ -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))
1.36 +11 -9 XEmacs/xemacs/lisp/update-elc.el
Index: update-elc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/update-elc.el,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -p -r1.35 -r1.36
--- update-elc.el 2005/02/03 07:11:20 1.35
+++ update-elc.el 2006/07/16 12:23:58 1.36
@@ -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 @@ If any of these files are changed, we ne
(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 @@ If any of these files are changed, we ne
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 any of these files are changed, we ne
(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 @@ If any of these files are changed, we ne
(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 @@ If any of these files are changed, we ne
;; 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