diff options
| author | Richard M. Stallman | 1994-01-07 14:18:17 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-01-07 14:18:17 +0000 |
| commit | de78a7baa872293027a23dbfb8b8edb3ec3c8cff (patch) | |
| tree | 8906efee308ee437e4879466db9ae5e5ca2cf860 | |
| parent | 0a3e18a0a9acb7da82f34147f37b46ac760af2bc (diff) | |
| download | emacs-de78a7baa872293027a23dbfb8b8edb3ec3c8cff.tar.gz emacs-de78a7baa872293027a23dbfb8b8edb3ec3c8cff.zip | |
Extend emacs-version based on which executable files exist.
| -rw-r--r-- | lisp/loadup.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/loadup.el b/lisp/loadup.el index a87190fb01f..52472eb2770 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el | |||
| @@ -122,6 +122,18 @@ | |||
| 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 | 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)))))) | ||
| 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 |