Mercurial > hg > xemacs-beta
changeset 4246:9fec7fedbf1b
[xemacs-hg @ 2007-10-31 11:21:02 by aidan]
Use correct coding system information for Installation-string.
author | aidan |
---|---|
date | Wed, 31 Oct 2007 11:21:15 +0000 |
parents | 119b227b734c |
children | abbca2b798d8 |
files | lisp/ChangeLog lisp/dumped-lisp.el lisp/help.el lisp/loadup.el lisp/mule/general-late.el lisp/update-elc-2.el lisp/update-elc.el lisp/version.el |
diffstat | 8 files changed, 100 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Oct 30 22:51:13 2007 +0000 +++ b/lisp/ChangeLog Wed Oct 31 11:21:15 2007 +0000 @@ -1,3 +1,36 @@ +2007-10-26 Aidan Kehoe <kehoea@parhasard.net> + + * mule/general-late.el: + Now that all the dumped coding systems are available, decode + Installation-string using the value for + Installation-file-coding-system at dump time. + +2007-10-26 Aidan Kehoe <kehoea@parhasard.net> + + * dumped-lisp.el (preloaded-file-list): + Allow version.el to be compiled. + * help.el (describe-installation): + Use and-boundp instead of (and (boundp ...); don't decode + Installation-string. Call #'error with a DATUM arg. + * loadup.el: + * loadup.el (Installation-string): Removed. + Moved to version.el. + * loadup.el (really-early-error-handler): + Move the initialization of Installation-string to version.el too. + * update-elc-2.el (update-elc-ignored-files): + * update-elc-2.el (batch-update-elc-2): + Remove version.el from the ignored files; if Mule is available, + always recompile it, since Installation-file-coding-system depends + on relatively complex Mule code. + * update-elc.el (unbytecompiled-lisp-files): + Remove version.el. + * version.el: + * version.el (Installation-file-coding-system): New. + Variable reflecting the native coding system at build time, to + better work out Installation-string. + * version.el (Installation-string): New. + Moved from loadup.el; documented in more detail. + 2007-10-26 Aidan Kehoe <kehoea@parhasard.net> * mule/latin.el:
--- a/lisp/dumped-lisp.el Tue Oct 30 22:51:13 2007 +0000 +++ b/lisp/dumped-lisp.el Wed Oct 31 11:21:15 2007 +0000 @@ -33,7 +33,7 @@ "post-gc" "replace" ; match-string used in version.el. - "version.el" ; Ignore compiled-by-mistake version.elc + "version" "cl" "cl-extra"
--- a/lisp/help.el Tue Oct 30 22:51:13 2007 +0000 +++ b/lisp/help.el Wed Oct 31 11:21:15 2007 +0000 @@ -829,16 +829,13 @@ (defun describe-installation () "Display a buffer showing information about this XEmacs was compiled." (interactive) - (if (and (boundp 'Installation-string) - (stringp Installation-string)) + (if (and-boundp 'Installation-string + (stringp Installation-string)) (with-displaying-help-buffer (lambda () - (princ - (if (fboundp 'decode-coding-string) - (decode-coding-string Installation-string 'automatic-conversion) - Installation-string))) + (princ Installation-string)) "Installation") - (error "No Installation information available."))) + (error 'unimplemented "No Installation information available."))) (defun view-emacs-news () "Display info on recent changes to XEmacs."
--- a/lisp/loadup.el Tue Oct 30 22:51:13 2007 +0000 +++ b/lisp/loadup.el Wed Oct 31 11:21:15 2007 +0000 @@ -69,9 +69,6 @@ (defvar preloaded-file-list nil "List of files preloaded into the XEmacs binary image.") -(defvar Installation-string nil - "Description of XEmacs installation.") - ;(start-profiling) (let ((gc-cons-threshold @@ -88,22 +85,6 @@ ;; This is awfully damn early to be getting an error, right? (call-with-condition-handler 'really-early-error-handler #'(lambda () - - ;; Initialize Installation-string. We do it before loading - ;; anything so that dumped code can make use of its value. - (setq Installation-string - (save-current-buffer - (set-buffer (get-buffer-create (generate-new-buffer-name - " *temp*"))) - ;; insert-file-contents-internal bogusly calls - ;; 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-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-directory)))
--- a/lisp/mule/general-late.el Tue Oct 30 22:51:13 2007 +0000 +++ b/lisp/mule/general-late.el Wed Oct 31 11:21:15 2007 +0000 @@ -54,7 +54,16 @@ (remassoc "German" language-info-alist)) language-info-alist (cons (assoc "English" language-info-alist) - (remassoc "English" language-info-alist))) + (remassoc "English" language-info-alist)) + + ;; Make Installation-string actually reflect the environment at + ;; byte-compile time. (We can't necessarily decode it when version.el + ;; is loaded, since not all the coding systems are available then.) + Installation-string (if-boundp 'Installation-file-coding-system + (decode-coding-string + Installation-string + Installation-file-coding-system) + Installation-string)) ;; At this point in the dump, all the charsets have been loaded. Now, load ;; their Unicode mappings. @@ -62,4 +71,4 @@ (let ((data-directory (expand-file-name "etc" source-directory))) (load-unicode-tables))) -;;; general-late.el ends here \ No newline at end of file +;;; general-late.el ends here
--- a/lisp/update-elc-2.el Tue Oct 30 22:51:13 2007 +0000 +++ b/lisp/update-elc-2.el Wed Oct 31 11:21:15 2007 +0000 @@ -65,8 +65,7 @@ "^make-docfile\\.el$" "^site-start\\.el$" "^site-load\\.el$" - "^site-init\\.el$" - "^version\\.el$")) + "^site-init\\.el$")) (defvar dirfiles-table (make-hash-table :test 'equal)) @@ -190,8 +189,12 @@ (byte-recompile-file (expand-file-name "custom-load.el" dir) 0) (when (featurep 'mule) (Custom-make-dependencies (expand-file-name "mule" dir)) - (byte-recompile-file (expand-file-name "mule/custom-load.el" dir) 0)) - ) + (byte-recompile-file (expand-file-name "mule/custom-load.el" dir) 0) + ;; See the eval-when-compile in the definition of + ;; Installation-file-coding-system; if the file name sniffing or the + ;; available coding systems have changed, version.elc should be + ;; rebuilt. + (byte-recompile-file (expand-file-name "version.el" dir) 0))) (setq command-line-args-left nil)) ;;; update-elc-2.el ends here
--- a/lisp/update-elc.el Tue Oct 30 22:51:13 2007 +0000 +++ b/lisp/update-elc.el Wed Oct 31 11:21:15 2007 +0000 @@ -117,8 +117,7 @@ '("paths.el" "dumped-lisp.el" "dumped-pkg-lisp.el" - "raw-process.el" - "version.el") + "raw-process.el") "Lisp files that should not be byte compiled. Files in `additional-dump-dependencies' do not need to be listed here.")
--- a/lisp/version.el Tue Oct 30 22:51:13 2007 +0000 +++ b/lisp/version.el Wed Oct 31 11:21:15 2007 +0000 @@ -129,16 +129,48 @@ ;;; We hope that this alias is easier for people to find. (define-function 'version 'emacs-version) -;; Put the emacs version number into the `pure[]' array in a form that -;; `what(1)' can extract from the executable or a core file. We don't -;; actually need this to be pointed to from lisp; pure objects can't -;; be GCed. -(concat "\n@" "(#)" (emacs-version) - "\n@" "(#)" "Configuration: " - system-configuration "\n") +(defvar Installation-file-coding-system + (eval-when-compile `,(coding-system-name (find-coding-system 'native))) + "The coding system used to create the `Installation' file. + +The `Installation' file is created by configure, and the +`Installation-string' variable reflects its contents. + +This is initialized to reflect the native coding system at the time +version.el was byte-compiled; ideally it would reflect the native coding +system of the environment when XEmacs was dumped, but the locale +initialization code isn't called at dump time, and the appropriate value +at byte-compile time should be close enough. Note that this means that the +value of `Installation-string' during dump time thus reflects loading the +file using the `binary' coding system. ") -;;Local variables: -;;version-control: never -;;End: +(defvar Installation-string + ;; Initialize Installation-string. We do it before loading + ;; anything so that dumped code can make use of its value. + (save-current-buffer + (set-buffer (get-buffer-create (generate-new-buffer-name + " *temp*"))) + ;; insert-file-contents-internal bogusly calls + ;; 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-directory) + ;; Relies on our working out the system coding system + ;; correctly at startup. + nil nil nil nil + ;; Installation-file-coding-system is actually respected in + ;; mule/general-late.el, after all the dumped coding systems have been + ;; loaded. + 'binary) + (fmakunbound 'format-decode) + (prog1 (buffer-substring) + (kill-buffer (current-buffer)))) + "Description of XEmacs installation. -;;; version.el ends here +This reflects the values that the configure script worked out at build time, +including things like the C code features included at compile time and the +installation prefix. Normally used when submitting a bug report; +occasionally used, in a way the XEmacs developers don't endorse, to work out +version information. ") + +;;; version.el ends here \ No newline at end of file