aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1994-01-07 14:18:17 +0000
committerRichard M. Stallman <[email protected]>1994-01-07 14:18:17 +0000
commitde78a7baa872293027a23dbfb8b8edb3ec3c8cff (patch)
tree8906efee308ee437e4879466db9ae5e5ca2cf860 /lisp
parent0a3e18a0a9acb7da82f34147f37b46ac760af2bc (diff)
Extend emacs-version based on which executable files exist.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/loadup.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/loadup.el b/lisp/loadup.el
index a87190fb01..52472eb277 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -122,6 +122,18 @@
(load "version.el") ;Don't get confused if someone compiled version.el by mistake.
+;; Determine which last version number to use
+;; based on the executables that now exist.
+(if (and (fboundp 'dump-emacs) (not (eq system-type 'ms-dos)))
+ (let* ((base (concat "emacs-" emacs-version))
+ (files (file-name-all-completions base default-directory))
+ (versions (mapcar (function (lambda (name)
+ (string-to-int (substring name (1+ (length base))))))
+ files)))
+ (setq emacs-version (format "%s.%d"
+ emacs-version
+ (1+ (apply 'max versions))))))
+
;; Note: all compiled Lisp files loaded above this point
;; must be among the ones parsed by make-docfile
;; to construct DOC. Any that are not processed