+(if (fboundp 'x-popup-menu)
+ (precompute-menubar-bindings))
+;; Turn on recording of which commands get rebound,
+;; for the sake of the next call to precompute-menubar-bindings.
+(setq define-key-rebound-commands nil)
+
+;; Determine which last version number to use
+;; based on the executables that now exist.
+(if (and (or (equal (nth 3 command-line-args) "dump")
+ (equal (nth 4 command-line-args) "dump"))
+ (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 (length base)))))
+ files)))
+ (setq emacs-version (format "%s.%d"
+ emacs-version
+ (if versions
+ (1+ (apply 'max versions))
+ 1)))))