# HG changeset patch # User aidan # Date 1153052638 0 # Node ID 1ee424086c622ff7d192bb53a7bb03271130a4b2 # Parent 06a586083be3cdcf7a565830e308fb5e030cddaf [xemacs-hg @ 2006-07-16 12:23:57 by aidan] Add docstrings to source-root, build-root, rename them diff -r 06a586083be3 -r 1ee424086c62 lisp/ChangeLog --- a/lisp/ChangeLog Sun Jul 16 10:51:48 2006 +0000 +++ b/lisp/ChangeLog Sun Jul 16 12:23:58 2006 +0000 @@ -1,3 +1,25 @@ +2006-07-16 Aidan Kehoe + + * 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 * unicode.el (decode-char): diff -r 06a586083be3 -r 1ee424086c62 lisp/loadhist.el --- a/lisp/loadhist.el Sun Jul 16 10:51:48 2006 +0000 +++ b/lisp/loadhist.el Sun Jul 16 12:23:58 2006 +0000 @@ -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." diff -r 06a586083be3 -r 1ee424086c62 lisp/loadup.el --- a/lisp/loadup.el Sun Jul 16 10:51:48 2006 +0000 +++ b/lisp/loadup.el Sun Jul 16 12:23:58 2006 +0000 @@ -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) diff -r 06a586083be3 -r 1ee424086c62 lisp/make-docfile.el --- a/lisp/make-docfile.el Sun Jul 16 10:51:48 2006 +0000 +++ b/lisp/make-docfile.el Sun Jul 16 12:23:58 2006 +0000 @@ -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)) diff -r 06a586083be3 -r 1ee424086c62 lisp/update-elc.el --- a/lisp/update-elc.el Sun Jul 16 10:51:48 2006 +0000 +++ b/lisp/update-elc.el Sun Jul 16 12:23:58 2006 +0000 @@ -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