Replace obsolete function lisp-complete-symbol
[bpt/emacs.git] / admin / admin.el
index ea08c0d..cb7eaea 100644 (file)
 
 (defvar add-log-time-format)           ; in add-log
 
-(defun add-release-logs (root version)
+;; Does this information need to be in every ChangeLog, as opposed to
+;; just the top-level one?  Only if you allow changes the same
+;; day as the release.
+;; http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00161.html
+(defun add-release-logs (root version &optional date)
   "Add \"Version VERSION released.\" change log entries in ROOT.
-Root must be the root of an Emacs source tree."
-  (interactive "DEmacs root directory: \nNVersion number: ")
+Root must be the root of an Emacs source tree.
+Optional argument DATE is the release date, default today."
+  (interactive (list (read-directory-name "Emacs root directory: ")
+                    (read-string "Version number: "
+                                 (format "%s.%s" emacs-major-version
+                                         emacs-minor-version))
+                    (read-string "Release date: "
+                                 (progn (require 'add-log)
+                                        (let ((add-log-time-zone-rule t))
+                                          (funcall add-log-time-format))))))
   (setq root (expand-file-name root))
   (unless (file-exists-p (expand-file-name "src/emacs.c" root))
     (error "%s doesn't seem to be the root of an Emacs source tree" root))
   (require 'add-log)
+  (or date (setq date (let ((add-log-time-zone-rule t))
+                       (funcall add-log-time-format))))
   (let* ((logs (process-lines "find" root "-name" "ChangeLog"))
         (entry (format "%s  %s  <%s>\n\n\t* Version %s released.\n\n"
-                       (funcall add-log-time-format)
+                       date
                        (or add-log-full-name (user-full-name))
                        (or add-log-mailing-address user-mail-address)
                        version)))
     (dolist (log logs)
-      (unless (string-match "/gnus/" log)
-       (find-file log)
-       (goto-char (point-min))
-       (insert entry)))))
+      (find-file log)
+      (goto-char (point-min))
+      (insert entry))))
 
 (defun set-version-in-file (root file version rx)
   (find-file (expand-file-name file root))
@@ -158,6 +171,10 @@ Root must be the root of an Emacs source tree."
   (set-version-in-file root "configure.ac" copyright
                       (rx (and bol "copyright" (0+ (not (in ?\")))
                                ?\" (submatch (1+ (not (in ?\")))) ?\")))
+  (set-version-in-file root "msdos/sed2v2.inp" copyright
+                      (rx (and bol "/^#undef " (1+ not-newline)
+                               "define COPYRIGHT" (1+ space)
+                               ?\" (submatch (1+ (not (in ?\")))) ?\")))
   (set-version-in-file root "nt/config.nt" copyright
                       (rx (and bol "#" (0+ blank) "define" (1+ blank)
                                "COPYRIGHT" (1+ blank)
@@ -339,12 +356,22 @@ the @import directive."
 
 (defun manual-pdf (texi-file dest)
   "Run texi2pdf on TEXI-FILE, emitting plaintext output to DEST."
-  (call-process "texi2pdf" nil nil nil texi-file "-o" dest))
+  (call-process "texi2pdf" nil nil nil
+               "-I" (expand-file-name "../emacs"
+                                      (file-name-directory texi-file))
+               "-I" (expand-file-name "../misc"
+                                      (file-name-directory texi-file))
+               texi-file "-o" dest))
 
 (defun manual-dvi (texi-file dest ps-dest)
   "Run texi2dvi on TEXI-FILE, emitting dvi output to DEST.
 Also generate PostScript output in PS-DEST."
-  (call-process "texi2dvi" nil nil nil texi-file "-o" dest)
+  (call-process "texi2dvi" nil nil nil
+               "-I" (expand-file-name "../emacs"
+                                      (file-name-directory texi-file))
+               "-I" (expand-file-name "../misc"
+                                      (file-name-directory texi-file))
+               texi-file "-o" dest)
   (call-process "dvips" nil nil nil dest "-o" ps-dest)
   (call-process "gzip" nil nil nil dest)
   (call-process "gzip" nil nil nil ps-dest))