Mercurial > emacs
comparison lisp/loadup.el @ 5489:3f6777439468
Extend emacs-version based on which executable files exist.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 07 Jan 1994 14:18:17 +0000 |
parents | ff128e39003b |
children | 3e7c458f3d7f |
comparison
equal
deleted
inserted
replaced
5488:8ea27d63e52b | 5489:3f6777439468 |
---|---|
119 ;For other systems, you must edit ../src/ymakefile. | 119 ;For other systems, you must edit ../src/ymakefile. |
120 (if (load "site-load" t) | 120 (if (load "site-load" t) |
121 (garbage-collect)) | 121 (garbage-collect)) |
122 | 122 |
123 (load "version.el") ;Don't get confused if someone compiled version.el by mistake. | 123 (load "version.el") ;Don't get confused if someone compiled version.el by mistake. |
124 | |
125 ;; Determine which last version number to use | |
126 ;; based on the executables that now exist. | |
127 (if (and (fboundp 'dump-emacs) (not (eq system-type 'ms-dos))) | |
128 (let* ((base (concat "emacs-" emacs-version)) | |
129 (files (file-name-all-completions base default-directory)) | |
130 (versions (mapcar (function (lambda (name) | |
131 (string-to-int (substring name (1+ (length base)))))) | |
132 files))) | |
133 (setq emacs-version (format "%s.%d" | |
134 emacs-version | |
135 (1+ (apply 'max versions)))))) | |
124 | 136 |
125 ;; Note: all compiled Lisp files loaded above this point | 137 ;; Note: all compiled Lisp files loaded above this point |
126 ;; must be among the ones parsed by make-docfile | 138 ;; must be among the ones parsed by make-docfile |
127 ;; to construct DOC. Any that are not processed | 139 ;; to construct DOC. Any that are not processed |
128 ;; for DOC will not have doc strings in the dumped Emacs. | 140 ;; for DOC will not have doc strings in the dumped Emacs. |