]> code.delx.au - gnu-emacs/blobdiff - admin/admin.el
Merge from origin/emacs-24
[gnu-emacs] / admin / admin.el
index 63b0d190c8046141933f5f3eb952cb3da7be84a6..18ea4a40ccc37309912c06116d0c336356fe19b5 100644 (file)
@@ -1,6 +1,6 @@
 ;;; admin.el --- utilities for Emacs administration
 
-;; Copyright (C) 2001-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2015 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -94,15 +94,13 @@ Root must be the root of an Emacs source tree."
                       (rx (and "AC_INIT" (1+ (not (in ?,)))
                                 ?, (0+ space)
                                 (submatch (1+ (in "0-9."))))))
-  (set-version-in-file root "doc/man/emacs.1" version
-                      (rx (and ".TH EMACS" (1+ not-newline)
-                                "GNU Emacs" (1+ space)
-                               (submatch (1+ (in "0-9."))))))
   ;; No longer used, broken in multiple ways, updating version seems pointless.
   (set-version-in-file root "nt/config.nt" version
                       (rx (and bol "#" (0+ blank) "define" (1+ blank)
                                "VERSION" (1+ blank) "\""
                                (submatch (1+ (in "0-9."))))))
+  ;; TODO: msdos could easily extract the version number from
+  ;; configure.ac with sed, rather than duplicating the information.
   (set-version-in-file root "msdos/sed2v2.inp" version
                       (rx (and bol "/^#undef " (1+ not-newline)
                                "define VERSION" (1+ space) "\""
@@ -111,58 +109,15 @@ Root must be the root of an Emacs source tree."
   (set-version-in-file root "nt/makefile.w32-in" version
                       (rx (and "VERSION" (0+ space) "=" (0+ space)
                                (submatch (1+ (in "0-9."))))))
-  ;; nt/emacs.rc also contains the version number, but in an awkward
-  ;; format. It must contain four components, separated by commas, and
-  ;; in two places those commas are followed by space, in two other
-  ;; places they are not.
-  (let* ((version-components (append (split-string version "\\.")
-                                    '("0" "0")))
-        (comma-version
-         (concat (car version-components) ","
-                 (cadr version-components) ","
-                 (cadr (cdr version-components)) ","
-                 (cadr (cdr (cdr version-components)))))
-        (comma-space-version
-         (concat (car version-components) ", "
-                 (cadr version-components) ", "
-                 (cadr (cdr version-components)) ", "
-                 (cadr (cdr (cdr version-components))))))
-    (set-version-in-file root "nt/emacs.rc" comma-version
-                        (rx (and "FILEVERSION" (1+ space)
-                                 (submatch (1+ (in "0-9,"))))))
-    (set-version-in-file root "nt/emacs.rc" comma-version
-                        (rx (and "PRODUCTVERSION" (1+ space)
-                                 (submatch (1+ (in "0-9,"))))))
-    (set-version-in-file root "nt/emacs.rc" comma-space-version
-                        (rx (and "\"FileVersion\"" (0+ space) ?, (0+ space)
-                                 ?\" (submatch (1+ (in "0-9, "))) "\\0\"")))
-    (set-version-in-file root "nt/emacs.rc" comma-space-version
-                        (rx (and "\"ProductVersion\"" (0+ space) ?,
-                                 (0+ space) ?\" (submatch (1+ (in "0-9, ")))
-                                 "\\0\"")))
-    ;; Likewise for emacsclient.rc
-    (set-version-in-file root "nt/emacsclient.rc" comma-version
-                        (rx (and "FILEVERSION" (1+ space)
-                                 (submatch (1+ (in "0-9,"))))))
-    (set-version-in-file root "nt/emacsclient.rc" comma-version
-                        (rx (and "PRODUCTVERSION" (1+ space)
-                                 (submatch (1+ (in "0-9,"))))))
-    (set-version-in-file root "nt/emacsclient.rc" comma-space-version
-                        (rx (and "\"FileVersion\"" (0+ space) ?, (0+ space)
-                                 ?\" (submatch (1+ (in "0-9, "))) "\\0\"")))
-    (set-version-in-file root "nt/emacsclient.rc" comma-space-version
-                        (rx (and "\"ProductVersion\"" (0+ space) ?,
-                                 (0+ space) ?\" (submatch (1+ (in "0-9, ")))
-                                 "\\0\"")))
-    ;; Major version only.
-    (when (string-match "\\([0-9]\\{2,\\}\\)" version)
-      (setq version (match-string 1 version))
-      (set-version-in-file root "src/msdos.c" version
-                          (rx (and "Vwindow_system_version" (1+ not-newline)
-                                   ?\( (submatch (1+ (in "0-9"))) ?\))))
-      (set-version-in-file root "etc/refcards/ru-refcard.tex" version
-                          "\\\\newcommand{\\\\versionemacs}\\[0\\]\
-{\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs")))
+  ;; Major version only.
+  (when (string-match "\\([0-9]\\{2,\\}\\)" version)
+    (setq version (match-string 1 version))
+    (set-version-in-file root "src/msdos.c" version
+                        (rx (and "Vwindow_system_version" (1+ not-newline)
+                                 ?\( (submatch (1+ (in "0-9"))) ?\))))
+    (set-version-in-file root "etc/refcards/ru-refcard.tex" version
+                        "\\\\newcommand{\\\\versionemacs}\\[0\\]\
+{\\([0-9]\\{2,\\}\\)}.+%.+version of Emacs"))
   (message "Setting version numbers...done"))
 
 ;; Note this makes some assumptions about form of short copyright.