Merge from emacs--rel--22
[bpt/emacs.git] / admin / admin.el
index 94e64a2..05cd7f9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; admin.el --- utilities for Emacs administration
 
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 ;;   Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
 ;;; Code:
 
-(defun process-lines (program &rest args)
-  "Execute PROGRAM with ARGS, returning its output as a list of lines.
-Signal an error if the program returns with a non-zero exit status."
-  (with-temp-buffer
-    (let ((status (apply 'call-process program nil (current-buffer) nil args)))
-      (unless (eq status 0)
-       (error "%s exited with status %s" program status))
-      (goto-char (point-min))
-      (let (lines)
-       (while (not (eobp))
-         (setq lines (cons (buffer-substring-no-properties
-                            (line-beginning-position)
-                            (line-end-position))
-                           lines))
-         (forward-line 1))
-       (nreverse lines)))))
-
 (defun add-release-logs (root version)
   "Add \"Version VERSION released.\" change log entries in ROOT.
 Root must be the root of an Emacs source tree."
@@ -85,12 +68,20 @@ Root must be the root of an Emacs source tree."
   (set-version-in-file root "README" version
                       (rx (and "version" (1+ space)
                                (submatch (1+ (in "0-9."))))))
-  (set-version-in-file root "man/emacs.texi" version
+  (set-version-in-file root "configure.in" version
+                      (rx (and "AC_INIT" (1+ (not (in ?,)))
+                                ?, (0+ space)
+                                (submatch (1+ (in "0-9."))))))
+  (set-version-in-file root "doc/emacs/emacs.texi" version
                       (rx (and "EMACSVER" (1+ space)
                                (submatch (1+ (in "0-9."))))))
-  (set-version-in-file root "lispref/elisp.texi" version
+  (set-version-in-file root "doc/lispref/elisp.texi" version
                       (rx (and "EMACSVER" (1+ 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."))))))
   (set-version-in-file root "lib-src/makefile.w32-in" version
                       (rx (and "VERSION" (0+ space) "=" (0+ space)
                                (submatch (1+ (in "0-9."))))))
@@ -161,6 +152,7 @@ Root must be the root of an Emacs source tree."
                "/* development, alpha, beta, or final (release) */"))))))
 
 ;; Note this makes some assumptions about form of short copyright.
+;; FIXME add the \year in the refcards/*.tex files.
 (defun set-copyright (root copyright)
   "Set Emacs short copyright to COPYRIGHT in relevant files under ROOT.
 Root must be the root of an Emacs source tree."
@@ -175,6 +167,9 @@ Root must be the root of an Emacs source tree."
   (set-version-in-file root "lisp/version.el" copyright
                       (rx (and "emacs-copyright" (0+ space)
                                ?\" (submatch (1+ (not (in ?\")))) ?\")))
+  (set-version-in-file root "lib-src/ebrowse.c" copyright
+                       (rx (and "emacs_copyright" (0+ (not (in ?\")))
+                               ?\" (submatch (1+ (not (in ?\")))) ?\")))
   (set-version-in-file root "lib-src/etags.c" copyright
                        (rx (and "emacs_copyright" (0+ (not (in ?\")))
                                ?\" (submatch (1+ (not (in ?\")))) ?\")))
@@ -205,5 +200,7 @@ Root must be the root of an Emacs source tree."
                               ?\" (0+ space)
                               "/* Long version number */")))))
 
+(provide 'admin)
+
 ;;; arch-tag: 4ea83636-2293-408b-884e-ad64f22a3bf5
 ;; admin.el ends here.