From 3f4a9d9d262d63562cdc9dde8d157567cb7c243c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 25 May 2016 12:47:13 -0400 Subject: [PATCH 1/5] * admin/authors.el (authors): First update the ChangeLog. * admin/make-tarball.txt: Related updates. --- admin/authors.el | 32 ++++++++++++++++++++++---------- admin/make-tarball.txt | 15 ++++++++------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/admin/authors.el b/admin/authors.el index f1aa2fa4428..b93c9b251ca 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -1361,24 +1361,36 @@ and changed by AUTHOR." (cons (list author wrote-list cowrote-list changed-list) authors-author-list))))) -(defun authors (root) +(defun authors (root &optional nologupdate) "Extract author information from change logs and Lisp source files. -ROOT is the root directory under which to find the files. If called -interactively, ROOT is read from the minibuffer. -Result is a buffer *Authors* containing authorship information, and a -buffer *Authors Errors* containing references to unknown files." - (interactive "DEmacs source directory: ") +ROOT is the root directory under which to find the files. +Interactively, read ROOT from the minibuffer. +Accurate author information requires up-to-date change logs, so this +first updates them, unless optional prefix argument NOLOGUPDATE is non-nil. +The result is a buffer *Authors* containing authorship information, +and a buffer *Authors Errors* containing references to unknown files." + (interactive "DEmacs source directory: \nP") (setq root (expand-file-name root)) + (unless (file-exists-p (expand-file-name "src/emacs.c" root)) + (unless (y-or-n-p + (format "Not the root directory of Emacs: %s, continue? " root)) + (user-error "Not the root directory"))) + ;; May contain your personal entries. + (or (not (file-exists-p (expand-file-name "ChangeLog" root))) + (y-or-n-p "Unversioned ChangeLog present, continue?") + (user-error "Unversioned ChangeLog may have irrelevant entries")) + (or nologupdate + ;; There are likely to be things that need fixing, so we update + ;; the versioned ChangeLog.N rather than the unversioned ChangeLog. + (zerop (call-process "make" nil nil nil + "-C" root "change-history-nocommit")) + (error "Problem updating ChangeLog")) (let ((logs (process-lines find-program root "-name" "ChangeLog*")) (table (make-hash-table :test 'equal)) (buffer-name "*Authors*") authors-checked-files-alist authors-invalid-file-names) (authors-add-fixed-entries table) - (unless (file-exists-p (expand-file-name "src/emacs.c" root)) - (unless (y-or-n-p - (format "Not the root directory of Emacs: %s, continue? " root)) - (error "Not the root directory"))) (dolist (log logs) (when (string-match "ChangeLog\\(.[0-9]+\\)?$" log) (message "Scanning %s..." log) diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index af18ff6a2e6..77486cc6399 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -37,14 +37,15 @@ General steps (for each step, check for possible errors): M-: (require 'authors) RET M-x authors RET + (This first updates the current versioned ChangeLog.N) + If there is an "*Authors Errors*" buffer, address the issues. - If there was a ChangeLog typo, run "make change-history" and then - fix the newest ChangeLog history file. If a file was deleted or - renamed, consider adding an appropriate entry to - authors-ignored-files, authors-valid-file-names, or + If there was a ChangeLog typo, fix the relevant entry. + If a file was deleted or renamed, consider adding an appropriate + entry to authors-ignored-files, authors-valid-file-names, or authors-renamed-files-alist. - If necessary, repeat M-x authors after making those changes. + If necessary, repeat 'C-u M-x authors' after making those changes. Save the "*Authors*" buffer as etc/AUTHORS. Check the diff looks reasonable. Maybe add entries to authors-ambiguous-files or authors-aliases, and repeat. @@ -85,8 +86,8 @@ General steps (for each step, check for possible errors): 5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. - Commit etc/AUTHORS, lisp/ldefs-boot.el, and the files changed - by M-x set-version. + Commit ChangeLog.N, etc/AUTHORS, lisp/ldefs-boot.el, and the + files changed by M-x set-version. If someone else made a commit between step 1 and now, you need to repeat from step 4 onwards. (You can commit the files From 42275df3dff4b81c7c6aa15df84deace9cfc9d6f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 25 May 2016 10:39:14 -0700 Subject: [PATCH 2/5] * doc/misc/texinfo.tex: Revert previous change (Bug#23611). --- doc/misc/texinfo.tex | 56 +++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 314063cafe1..37e2de896ec 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2016-05-07.20} +\def\texinfoversion{2016-04-14.07} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -67,10 +67,6 @@ \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} -% LaTeX's \typeout. This ensures that the messages it is used for -% are identical in format to the corresponding ones from latex/pdflatex. -\def\typeout{\immediate\write17}% - \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. @@ -1538,6 +1534,7 @@ % % PDF outline support % + \pdfmakepagedesttrue \relax % Emulate the primitive of pdfTeX \def\pdfdest name#1 xyz{% \special{pdf:dest (name#1) [@thispage /XYZ @xpos @ypos]}% @@ -3273,8 +3270,8 @@ % @{ @} @lbracechar{} @rbracechar{} all generate brace characters. % Unless we're in typewriter, use \ecfont because the CM text fonts do % not have braces, and we don't want to switch into math. -\def\mylbrace{{\ifmonospace\char123\else\ensuremath\lbrace\fi}} -\def\myrbrace{{\ifmonospace\char125\else\ensuremath\rbrace\fi}} +\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} +\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} \let\{=\mylbrace \let\lbracechar=\{ \let\}=\myrbrace \let\rbracechar=\} \begingroup @@ -4756,7 +4753,7 @@ \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} -% Used when writing an index entry out to an index file to prevent +% Used when writing an index entry out to an index file, to prevent % expansion of Texinfo commands that can appear in an index entry. % \def\indexdummies{% @@ -4892,9 +4889,12 @@ % % We want to disable all macros so that they are not expanded by \write. \macrolist - \definedummyword\value % \normalturnoffactive + % + % Handle some cases of @value -- where it does not contain any + % (non-fully-expandable) commands. + \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. @@ -5159,10 +5159,9 @@ \ifx\suffix\indexisfl\def\suffix{f1}\fi % Open the file \immediate\openout\csname#1indfile\endcsname \jobname.\suffix - % Using \immediate above here prevents an object entering into the current - % box, which could confound checks such as those in \safewhatsit for - % preceding skips. - \typeout{Writing index file \jobname.\suffix}% + % Using \immediate here prevents an object entering into the current box, + % which could confound checks such as those in \safewhatsit for preceding + % skips. \fi} \def\indexisfl{fl} @@ -5370,7 +5369,6 @@ % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent - \typeout{No file \jobname.\indexname s.}% \else \catcode`\\ = 0 % @@ -6684,14 +6682,7 @@ % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. - \ifpdf - \global\pdfmakepagedesttrue - \else - \ifx\XeTeXrevision\thisisundefined - \else - \global\pdfmakepagedesttrue - \fi - \fi + \ifpdf \global\pdfmakepagedesttrue \fi } @@ -8871,7 +8862,6 @@ % include an _ in the xref name, etc. \indexnofonts \turnoffactive - \def\value##1{##1}% \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% @@ -9012,14 +9002,14 @@ \fi\fi\fi } -% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX -% is output afterwards if non-empty. +% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. +% If its value is nonempty, SUFFIX is output afterward. +% \def\refx#1#2{% \requireauxfile {% \indexnofonts \otherbackslash - \def\value##1{##1}% \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% @@ -9044,18 +9034,16 @@ #2% Output the suffix in any case. } -% This is the macro invoked by entries in the aux file. Define a control -% sequence for a cross-reference target (we prepend XR to the control sequence -% name to avoid collisions). The value is the page number. If this is a float -% type, we have more work to do. +% This is the macro invoked by entries in the aux file. Usually it's +% just a \def (we prepend XR to the control sequence name to avoid +% collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% - {% Expand the node or anchor name to remove control sequences. - % \turnoffactive stops 8-bit characters being changed to commands - % like @'e. \refx does the same to retrieve the value in the definition. + {% The node name might contain 8-bit characters, which in our current + % implementation are changed to commands like @'e. Don't let these + % mess up the control sequence name. \indexnofonts \turnoffactive - \def\value##1{##1}% \xdef\safexrefname{#1}% }% % From 3c79e51821720a32782a7601d01b7e97a110dc67 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 25 May 2016 14:17:25 -0400 Subject: [PATCH 3/5] * admin/admin.el (add-release-logs): Generate ChangeLog if needed. --- admin/admin.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/admin.el b/admin/admin.el index a3d56277918..33b0808f4fa 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -47,8 +47,9 @@ Optional argument DATE is the release date, default today." ;; your own personal one. Perhaps we should move any existing file ;; and unconditionally call make ChangeLog? ;; Or make ChangeLog CHANGELOG=temp and compare with the existing? - (unless (file-exists-p (expand-file-name "ChangeLog" root)) - (user-error "No top-level ChangeLog - run \"make ChangeLog\" first")) + (or (file-exists-p (expand-file-name "ChangeLog" root)) + (zerop (call-process "make" nil nil nil "-C" root "ChangeLog")) + (error "Problem generating ChangeLog")) (require 'add-log) (or date (setq date (funcall add-log-time-format nil t))) (let* ((logs (process-lines "find" root "-name" "ChangeLog")) From 5fa80cfe9fc1b7056b5cbf7fa6a44a23611d6f01 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 25 May 2016 14:35:44 -0400 Subject: [PATCH 4/5] * build-aux/gitlog-to-emacslog: Handle empty generated ChangeLog. This is relevant for M-x add-release-logs right after M-x authors. --- build-aux/gitlog-to-emacslog | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog index 5c187f5eae0..345c37f63da 100755 --- a/build-aux/gitlog-to-emacslog +++ b/build-aux/gitlog-to-emacslog @@ -81,7 +81,7 @@ test -d .git || { --ignore-line='^; ' --format='%B' \ "$gen_origin..$new_origin" >"ChangeLog.tmp" || exit -if test -s "ChangeLog.tmp"; then +if test -e "ChangeLog.tmp"; then # Fix up bug references. # This would be better as eg a --transform option to gitlog-to-changelog, @@ -99,7 +99,7 @@ if test -s "ChangeLog.tmp"; then ` start_year= end_year= - for year in $years; do + for year in ${years:-`date +%Y`}; do : ${start_year:=$year} end_year=$year done @@ -110,13 +110,19 @@ if test -s "ChangeLog.tmp"; then year_range=$start_year-$end_year fi - # Update gen_origin and append a proper copyright notice. - sed -n ' - 1i\ + # Update gen_origin + if test "$gen_origin" != "$new_origin"; then + sed -n ' + 1i\ - /^This file records repository revisions/p - s/^commit [0-9a-f]* (exclusive)/commit '"$gen_origin"' (exclusive)/p - s/^commit [0-9a-f]* (inclusive)/commit '"$new_origin"' (inclusive)/p + /^This file records repository revisions/p + s/^commit [0-9a-f]* (exclusive)/commit '"$gen_origin"' (exclusive)/p + s/^commit [0-9a-f]* (inclusive)/commit '"$new_origin"' (inclusive)/p + ' >"ChangeLog.tmp" || exit + fi + + # Append a proper copyright notice. + sed -n ' /^See ChangeLog.[0-9]* for earlier/,${ s/ChangeLog\.[0-9]*/ChangeLog.'$nmax'/ s/\(Copyright[ (C)]*\)[0-9]*-[0-9]*/\1'"$year_range"'/ From 853b9b92072e9eff11aff9c0110380c9a93864ca Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 25 May 2016 14:45:05 -0400 Subject: [PATCH 5/5] * admin/admin.el (add-release-logs): Basic check of existing ChangeLog. --- admin/admin.el | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/admin/admin.el b/admin/admin.el index 33b0808f4fa..4af1ff9003a 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -43,13 +43,19 @@ Optional argument DATE is the release date, default today." (setq root (expand-file-name root)) (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)) - ;; FIXME this does not check that a ChangeLog that exists is not - ;; your own personal one. Perhaps we should move any existing file - ;; and unconditionally call make ChangeLog? - ;; Or make ChangeLog CHANGELOG=temp and compare with the existing? - (or (file-exists-p (expand-file-name "ChangeLog" root)) - (zerop (call-process "make" nil nil nil "-C" root "ChangeLog")) - (error "Problem generating ChangeLog")) + (let ((clog (expand-file-name "ChangeLog" root))) + (if (file-exists-p clog) + ;; Basic check that a ChangeLog that exists is not your personal one. + ;; TODO Perhaps we should move any existing file and unconditionally + ;; call make ChangeLog? Or make ChangeLog CHANGELOG=temp and compare + ;; with the existing? + (with-temp-buffer + (insert-file-contents clog) + (or (re-search-forward "^[ \t]*Copyright.*Free Software" nil t) + (user-error "ChangeLog looks like a personal one - remove it?"))) + (or + (zerop (call-process "make" nil nil nil "-C" root "ChangeLog")) + (error "Problem generating ChangeLog")))) (require 'add-log) (or date (setq date (funcall add-log-time-format nil t))) (let* ((logs (process-lines "find" root "-name" "ChangeLog"))