comparison lisp/version.el @ 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 151d438d2d55
children 41c84a94258b
comparison
equal deleted inserted replaced
4245:119b227b734c 4246:9fec7fedbf1b
127 ((>= emacs-patch patch))))) 127 ((>= emacs-patch patch)))))
128 128
129 ;;; We hope that this alias is easier for people to find. 129 ;;; We hope that this alias is easier for people to find.
130 (define-function 'version 'emacs-version) 130 (define-function 'version 'emacs-version)
131 131
132 ;; Put the emacs version number into the `pure[]' array in a form that 132 (defvar Installation-file-coding-system
133 ;; `what(1)' can extract from the executable or a core file. We don't 133 (eval-when-compile `,(coding-system-name (find-coding-system 'native)))
134 ;; actually need this to be pointed to from lisp; pure objects can't 134 "The coding system used to create the `Installation' file.
135 ;; be GCed.
136 (concat "\n@" "(#)" (emacs-version)
137 "\n@" "(#)" "Configuration: "
138 system-configuration "\n")
139 135
140 ;;Local variables: 136 The `Installation' file is created by configure, and the
141 ;;version-control: never 137 `Installation-string' variable reflects its contents.
142 ;;End: 138
139 This is initialized to reflect the native coding system at the time
140 version.el was byte-compiled; ideally it would reflect the native coding
141 system of the environment when XEmacs was dumped, but the locale
142 initialization code isn't called at dump time, and the appropriate value
143 at byte-compile time should be close enough. Note that this means that the
144 value of `Installation-string' during dump time thus reflects loading the
145 file using the `binary' coding system. ")
146
147 (defvar Installation-string
148 ;; Initialize Installation-string. We do it before loading
149 ;; anything so that dumped code can make use of its value.
150 (save-current-buffer
151 (set-buffer (get-buffer-create (generate-new-buffer-name
152 " *temp*")))
153 ;; insert-file-contents-internal bogusly calls
154 ;; format-decode without checking if it's defined.
155 (fset 'format-decode #'(lambda (f l &optional v) l))
156 (insert-file-contents-internal
157 (expand-file-name "Installation" build-directory)
158 ;; Relies on our working out the system coding system
159 ;; correctly at startup.
160 nil nil nil nil
161 ;; Installation-file-coding-system is actually respected in
162 ;; mule/general-late.el, after all the dumped coding systems have been
163 ;; loaded.
164 'binary)
165 (fmakunbound 'format-decode)
166 (prog1 (buffer-substring)
167 (kill-buffer (current-buffer))))
168 "Description of XEmacs installation.
169
170 This reflects the values that the configure script worked out at build time,
171 including things like the C code features included at compile time and the
172 installation prefix. Normally used when submitting a bug report;
173 occasionally used, in a way the XEmacs developers don't endorse, to work out
174 version information. ")
143 175
144 ;;; version.el ends here 176 ;;; version.el ends here