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.
This commit is contained in:
parent
8675f9c8b8
commit
22b2207471
8 changed files with 38 additions and 23 deletions
|
@ -93,9 +93,7 @@ Optional argument DATE is the release date, default today."
|
|||
Root must be the root of an Emacs source tree."
|
||||
(interactive (list
|
||||
(read-directory-name "Emacs root directory: " source-directory)
|
||||
(read-string "Version number: "
|
||||
(replace-regexp-in-string "\\.[0-9]+\\'" ""
|
||||
emacs-version))))
|
||||
(read-string "Version number: " emacs-version)))
|
||||
(unless (file-exists-p (expand-file-name "src/emacs.c" root))
|
||||
(user-error "%s doesn't seem to be the root of an Emacs source tree" root))
|
||||
(message "Setting version numbers...")
|
||||
|
|
|
@ -480,8 +480,8 @@ running. It is useful to include this string in bug reports.
|
|||
@smallexample
|
||||
@group
|
||||
(emacs-version)
|
||||
@result{} "GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16)
|
||||
of 2015-06-01"
|
||||
@result{} "GNU Emacs 26.1 (build 1, x86_64-unknown-linux-gnu,
|
||||
GTK+ Version 3.16) of 2017-06-01"
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
|
@ -507,11 +507,11 @@ emacs-build-time
|
|||
|
||||
@defvar emacs-version
|
||||
The value of this variable is the version of Emacs being run. It is a
|
||||
string such as @code{"23.1.1"}. The last number in this string is not
|
||||
really part of the Emacs release version number; it is incremented
|
||||
each time Emacs is built in any given directory. A value with four
|
||||
numeric components, such as @code{"22.0.91.1"}, indicates an
|
||||
unreleased test version.
|
||||
string such as @code{"26.1"}. A value with three numeric components,
|
||||
such as @code{"26.0.91"}, indicates an unreleased test version.
|
||||
(Prior to Emacs 26.1, the string includes an extra final component
|
||||
with the integer that is now stored in @code{emacs-build-number};
|
||||
e.g., @code{"25.1.1"}.)
|
||||
@end defvar
|
||||
|
||||
@defvar emacs-major-version
|
||||
|
@ -524,6 +524,12 @@ The minor version number of Emacs, as an integer. For Emacs version
|
|||
23.1, the value is 1.
|
||||
@end defvar
|
||||
|
||||
@defvar emacs-build-number
|
||||
An integer that increments each time Emacs is built in the same
|
||||
directory (without cleaning). This is only of relevance when
|
||||
developing Emacs.
|
||||
@end defvar
|
||||
|
||||
@node Acknowledgments
|
||||
@section Acknowledgments
|
||||
|
||||
|
|
3
etc/NEWS
3
etc/NEWS
|
@ -80,6 +80,9 @@ for '--daemon'.
|
|||
|
||||
* Changes in Emacs 26.1
|
||||
|
||||
** The variable 'emacs-version' no longer includes the build number.
|
||||
This is now stored separately in a new variable, 'emacs-build-number'.
|
||||
|
||||
+++
|
||||
** The new function 'mapbacktrace' applies a function to all frames of
|
||||
the current stack trace.
|
||||
|
|
|
@ -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 ")")
|
||||
"")))
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -2607,7 +2607,12 @@ This is nil during initialization. */);
|
|||
Vemacs_copyright = build_string (emacs_copyright);
|
||||
|
||||
DEFVAR_LISP ("emacs-version", Vemacs_version,
|
||||
doc: /* Version numbers of this version of Emacs. */);
|
||||
doc: /* Version numbers of this version of Emacs.
|
||||
This has the form: MAJOR.MINOR[.MICRO], where MAJOR/MINOR/MICRO are integers.
|
||||
MICRO is only present in unreleased development versions,
|
||||
and is not especially meaningful. Prior to Emacs 26.1, an extra final
|
||||
component .BUILD is present. This is now stored separately in
|
||||
`emacs-build-number'. */);
|
||||
Vemacs_version = build_string (emacs_version);
|
||||
|
||||
DEFVAR_LISP ("report-emacs-bug-address", Vreport_emacs_bug_address,
|
||||
|
|
Loading…
Add table
Reference in a new issue