diff options
| author | Glenn Morris <rgm@gnu.org> | 2017-02-17 20:15:21 -0500 |
|---|---|---|
| committer | Glenn Morris <rgm@gnu.org> | 2017-02-17 20:15:21 -0500 |
| commit | 22b2207471807bda86534b4faf1a29b3a6447536 (patch) | |
| tree | 79f65cff576fe028b6556fc2763579a36610d7e7 /lisp | |
| parent | 8675f9c8b8a002530d0c4e0263bb3d4cf3a649fa (diff) | |
| download | emacs-22b2207471807bda86534b4faf1a29b3a6447536.tar.gz | |
Remove the build number from emacs-version variable
It's a largely internal detail that can confuse users. (Bug#25590)
* lisp/version.el (emacs-build-number): New constant.
(emacs-version): Use emacs-build-number.
* lisp/loadup.el (top-level): When dumping, increment
emacs-build-number rather than emacs-version.
* src/emacs.c (emacs-version): Doc fix.
* doc/lispref/intro.texi (Version Info): Update emacs-version details.
Mention emacs-build-number.
* lisp/gnus/gnus-util.el (gnus-emacs-version):
* lisp/mail/emacsbug.el (report-emacs-bug):
* admin/admin.el (set-version): Update for emacs-version change.
; * etc/NEWS: Mention this.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/gnus/gnus-util.el | 2 | ||||
| -rw-r--r-- | lisp/loadup.el | 11 | ||||
| -rw-r--r-- | lisp/mail/emacsbug.el | 5 | ||||
| -rw-r--r-- | lisp/version.el | 9 |
4 files changed, 15 insertions, 12 deletions
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index ff5c2950914..20eceb58edd 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1618,7 +1618,7 @@ sequence, this is like `mapcar'. With several, it is like the Common Lisp ((not (memq 'emacs lst)) nil) ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version) - (concat "Emacs/" (match-string 1 emacs-version) + (concat "Emacs/" emacs-version (if system-v (concat " (" system-v ")") ""))) diff --git a/lisp/loadup.el b/lisp/loadup.el index ecb72840c43..5b19b05a82e 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -350,7 +350,7 @@ lost after dumping"))) (multibyte-string-p default-directory)) (error "default-directory must be unibyte when dumping Emacs!")) -;; Determine which last version number to use +;; Determine which build number to use ;; based on the executables that now exist. (if (and (equal (last command-line-args) '("dump")) (not (eq system-type 'ms-dos))) @@ -364,10 +364,9 @@ lost after dumping"))) files))) (setq emacs-repository-version (condition-case nil (emacs-repository-get-version) (error nil))) - ;; `emacs-version' is a constant, so we shouldn't change it with `setq'. - (defconst emacs-version - (format "%s.%d" - emacs-version (if versions (1+ (apply 'max versions)) 1))))) + ;; A constant, so we shouldn't change it with `setq'. + (defconst emacs-build-number + (if versions (1+ (apply 'max versions)) 1)))) (message "Finding pointers to doc strings...") @@ -463,7 +462,7 @@ lost after dumping"))) ;; Don't bother adding another name if we're just ;; building bootstrap-emacs. (equal (last command-line-args) '("bootstrap")))) - (let ((name (concat "emacs-" emacs-version)) + (let ((name (format "emacs-%s.%d" emacs-version emacs-build-number)) (exe (if (eq system-type 'windows-nt) ".exe" ""))) (while (string-match "[^-+_.a-zA-Z0-9]+" name) (setq name (concat (downcase (substring name 0 (match-beginning 0))) diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index c8214c35108..ecb7db60ae1 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -151,10 +151,7 @@ Prompts for bug subject. Leaves you in a mail buffer." (interactive "sBug Subject: ") ;; The syntax `version;' is preferred to `[version]' because the ;; latter could be mistakenly stripped by mailing software. - (if (eq system-type 'ms-dos) - (setq topic (concat emacs-version "; " topic)) - (when (string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version) - (setq topic (concat (match-string 1 emacs-version) "; " topic)))) + (setq topic (concat emacs-version "; " topic)) (let ((from-buffer (current-buffer)) (can-insert-mail (or (report-emacs-bug-can-use-xdg-email) (report-emacs-bug-can-use-osx-open))) diff --git a/lisp/version.el b/lisp/version.el index 99ab3519a7e..ea6f1b46948 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -44,6 +44,12 @@ This variable first existed in version 19.23.") (defconst emacs-build-time (if emacs-build-system (current-time)) "Time at which Emacs was dumped out, or nil if not available.") +(defconst emacs-build-number 1 ; loadup.el may increment this + "The build number of this version of Emacs. +This is an integer that increments each time Emacs is built in a given +directory (without cleaning). This is likely to only be relevant when +developing Emacs.") + (defvar motif-version-string) (defvar gtk-version-string) (defvar ns-version-string) @@ -56,8 +62,9 @@ Don't use this function in programs to choose actions according to the system configuration; look at `system-configuration' instead." (interactive "P") (let ((version-string - (format "GNU Emacs %s (%s%s%s%s)%s" + (format "GNU Emacs %s (build %s, %s%s%s%s)%s" emacs-version + emacs-build-number system-configuration (cond ((featurep 'motif) (concat ", " (substring motif-version-string 4))) |
