# HG changeset patch # User Richard M. Stallman # Date 757952297 0 # Node ID 3f6777439468a3154a590ad6ef0890dc179b4f13 # Parent 8ea27d63e52bbda13045ab229e00e334495bf0af Extend emacs-version based on which executable files exist. diff -r 8ea27d63e52b -r 3f6777439468 lisp/loadup.el --- a/lisp/loadup.el Fri Jan 07 14:15:21 1994 +0000 +++ b/lisp/loadup.el Fri Jan 07 14:18:17 1994 +0000 @@ -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