(semantic-gcc-setup): Replace runtime use of CL function `remove-if-not'.
[bpt/emacs.git] / lisp / emacs-lisp / authors.el
CommitLineData
25b30b16 1;;; authors.el --- utility for maintaining Emacs' AUTHORS file -*-coding: utf-8;-*-
3215096c 2
93da04c0
GM
3;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
4;; 2009 Free Software Foundation, Inc.
3215096c 5
60e8e0a5 6;; Author: Gerd Moellmann <gerd@gnu.org>
f39caf44 7;; Maintainer: Kim F. Storm <storm@cua.dk>
60e8e0a5
GM
8;; Keywords: maint
9
3215096c
GM
10;; This file is part of GNU Emacs.
11
d6cba7ae 12;; GNU Emacs is free software: you can redistribute it and/or modify
3215096c 13;; it under the terms of the GNU General Public License as published by
d6cba7ae
GM
14;; the Free Software Foundation, either version 3 of the License, or
15;; (at your option) any later version.
3215096c
GM
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
d6cba7ae 23;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
3215096c
GM
24
25;;; Commentary:
26
27;; Use M-x authors RET to create an *Authors* buffer that can used as
28;; or merged with Emacs' AUTHORS file.
29
30;;; Code:
31
25b30b16 32(defvar authors-coding-system 'utf-8
f39caf44
KS
33 "Coding system used in the AUTHORS file.")
34
3215096c
GM
35(defconst authors-many-files 20
36 "Maximum number of files for which to print individual information.
f39caf44
KS
37If an author has modified more files, only the names of the most
38frequently modified files are printed and a count of the additional
39files.")
3215096c
GM
40
41(defconst authors-aliases
f39caf44 42 '(
01cc3e13 43 ("Aaron S. Hawley" "Aaron Hawley")
9109bf49 44 ("Andrew Csillag" "Drew Csillag")
9dfa8726 45 ("Anna M. Bigatti" "Anna Bigatti")
f39caf44
KS
46 ("Barry A. Warsaw" "Barry A. Warsaw, Century Computing, Inc."
47 "Barry A. Warsaw, ITB" "Barry Warsaw")
6b5e47dd
GM
48 ("Bill Mann" "William F. Mann")
49 ("Bill Rozas" "Guillermo J. Rozas")
25b30b16 50 ("Björn Torkelsson" "Bjorn Torkelsson")
f39caf44
KS
51 ("Brian Fox" "Brian J. Fox")
52 ("Christoph Wedler" "Christoph.Wedler@sap.com")
53 ("Daniel Pfeiffer" "<Daniel.Pfeiffer@Informatik.START.db.de>"
54 "<Daniel.Pfeiffer@Informatik.START.dbp.de>")
6b5e47dd 55 ("David De La Harpe Golden" "David Golden")
f39caf44 56 ("David Gillespie" "Dave Gillespie")
25b30b16 57 ("David Kågedal" "David K..edal")
93da04c0 58 ("David M. Koppelman" "David M. Koppelman, Koppel@Ec?e.Lsu.Edu"
605046ef 59 "David Koppelman")
d0f483e8 60 ("David M. Smith" "David Smith" "David M Smith")
01cc3e13 61 ("Deepak Goel" "D. Goel")
d0f483e8 62 ("Ed L. Cashin" "Ed L Cashin")
f39caf44
KS
63 ("Edward M. Reingold" "Ed Reingold" "Edward M Reingold"
64 "Reingold Edward M")
65 ("Eli Zaretskii" "eliz")
4ee02020 66 ("Emilio C. Lopes" "Emilio Lopes")
d0f483e8 67 ("Era Eriksson" "Era@Iki.Fi")
f39caf44
KS
68 ("Eric M. Ludlam" "Eric Ludlam")
69 ("Eric S. Raymond" "Eric Raymond")
70 ("Eric Youngdale" "(Eric Youngdale at youngdale@v6550c.nrl.navy.mil)")
d0f483e8 71 ("Francis J. Wright" "Dr Francis J. Wright" "Francis Wright")
25b30b16
GM
72 ("François Pinard" "Francois Pinard")
73 ("Francesco Potortì" "Francesco Potorti" "Francesco Potorti`")
f39caf44
KS
74 ("Frederic Pierresteguy" "Fred Pierresteguy")
75 ("Geoff Voelker" "voelker")
25b30b16 76 ("Gerd Möllmann" "Gerd Moellmann")
6b5e47dd 77 ("Hallvard B. Furuseth" "Hallvard B Furuseth" "Hallvard Furuseth")
25b30b16 78 ("Hrvoje Nikšić" "Hrvoje Niksic")
2603d79b
GM
79 ;; src/ChangeLog.4, 1994-01-11, since fixed.
80;;; (nil "(afs@hplb.hpl.hp.com)")
81 ;; lisp/gnus/ChangeLog.1, 1998-01-15.
82 ;; http://quimby.gnus.org/cgi-bin/cvsweb.cgi/gnus/lisp/gnus-art.el?rev=4.13
f39caf44 83 (nil "<Use-Author-Address-Header@\\[127.1\\]>")
2603d79b
GM
84 (nil "Code Extracted") ; lisp/newcomment.el's "Author:" header
85 (nil "\\`FSF") ; FIXME what is this for - no effect?
86 ;; lisp/gnus/ChangeLog.1, 1997-10-12, since fixed.
87;;; (nil "ISO-2022-JP")
f39caf44 88 ("Jaeyoun Chung" "Jae-youn Chung" "Jae-you Chung" "Chung Jae-youn")
25b30b16 89 ("Jan Djärv" "Jan D." "Jan Djarv")
d0f483e8 90 ("Jay K. Adams" "jka@ece.cmu.edu" "Jay Adams")
25b30b16 91 ("Jérôme Marant" "Jérôme Marant" "Jerome Marant")
f39caf44 92 ("Jens-Ulrik Holger Petersen" "Jens-Ulrik Petersen")
605046ef 93 ("Jeremy Bertram Maitin-Shepard" "Jeremy Maitin-Shepard")
25b30b16 94 ("Johan Bockgård" "Johan Bockgard")
4ee02020 95 ("John W. Eaton" "John Eaton")
f39caf44
KS
96 ("Jonathan I. Kamens" "Jonathan Kamens")
97 ("Joseph Arceneaux" "Joe Arceneaux")
6b5e47dd 98 ("Joseph M. Kelsey" "Joe Kelsey") ; FIXME ?
25b30b16 99 ("Juan León Lahoz García" "Juan-Leon Lahoz Garcia")
f39caf44 100 ("K. Shane Hartman" "Shane Hartman")
25b30b16 101 ("Kai Großjohann" "Kai Grossjohann" "Kai Großjohann"
d0f483e8
KS
102 "Kai.Grossjohann@Cs.Uni-Dortmund.De"
103 "Kai.Grossjohann@Gmx.Net")
f39caf44 104 ("Karl Berry" "K. Berry")
25b30b16 105 ("Károly Lőrentey" "Károly Lőrentey" "Lőrentey Károly")
d0f483e8 106 ("Kazushi Marukawa" "Kazushi")
f39caf44
KS
107 ("Ken Manheimer" "Kenneth Manheimer")
108 ("Kenichi Handa" "Ken'ichi Handa" "Kenichi HANDA")
4ee02020 109 ("Kevin Greiner" "Kevin J. Greiner")
f39caf44 110 ("Kim F. Storm" "Kim Storm")
d0f483e8 111 ("Kyle Jones" "Kyle E. Jones")
f39caf44 112 ("Marcus G. Daniels" "Marcus Daniels")
d0f483e8 113 ("Mark D. Baushke" "Mark D Baushke")
6b5e47dd 114 ("Marko Kohtala" "Kohtala Marko")
25b30b16 115 ("Agustín Martín" "Agustin Martin")
d0f483e8
KS
116 ("Martin Lorentzon" "Martin Lorentzson")
117 ("Matt Swift" "Matthew Swift")
6b5e47dd 118 ("Maxime Edouard Robert Froumentin" "Max Froumentin")
4ee02020 119 ("Michael R. Mauger" "Michael Mauger")
f39caf44 120 ("Michael D. Ernst" "Michael Ernst")
25b30b16 121 ("Michaël Cadilhac" "Michael Cadilhac")
f39caf44 122 ("Michael I. Bushnell" "Michael I Bushnell" "Michael I. Bushnell, P/Bsg")
6b5e47dd
GM
123 ("Michael R. Cook" "Michael Cook")
124 ("Michael Sperber" "Michael Sperber \\[Mr. Preprocessor\\]")
4ee02020 125 ("Mikio Nakajima" "Nakajima Mikio")
6b5e47dd 126 ("Nelson Jose dos Santos Ferreira" "Nelson Ferreira")
f39caf44
KS
127 ("Paul Eggert" "eggert")
128 ("Paul Reilly" "(pmr@legacy.pajato.com)")
be3f421b 129 ("Pavel Janík" "Pavel Janík Ml." "Pavel Janik Ml." "Pavel Janik" "Pavel Janík" "Pavel@Janik.Cz")
24e15888 130 ("Pavel Kobiakov" "Pavel Kobyakov")
f39caf44 131 ("Per Abrahamsen" "Per Abhiddenware")
24e15888 132 ("Per Starbäck" "Per Starback")
d0f483e8
KS
133 ("Peter S. Galbraith" "Peter Galbraith")
134 ("Peter Runestig" "Peter 'luna' Runestig")
f39caf44 135 ("Peter S. Galbraith" "Peter S Galbraith")
6b5e47dd
GM
136 ("Raja R. Harinath" "Raja R Harinath")
137 ("Richard G. Bielawski" "Richard G Bielawski" "Richard Bielawski")
138 ("Richard King" "Dick King")
f39caf44 139 ("Richard M. Stallman" "Richard M. Stallman,,," "Richard Stallman"
a1506d29 140 "rms" "rms@gnu.org")
f39caf44
KS
141 ("Robert J. Chassell" "Bob Chassell")
142 ("Roland B. Roberts" "Roland B Roberts" "Roland Roberts")
143 ("Rui-Tao Dong" "Rui-Tao Dong ~{6-Hpln~}")
a8d37031 144 ("Sacha Chua" "Sandra Jean Chua")
f39caf44 145 ("Sam Steingold" "Sam Shteingold")
9109bf49 146 ("Satyaki Das" "Indexed search by Satyaki Das")
93da04c0
GM
147 ;; There are other Stefans.
148;;; ("Stefan Monnier" "Stefan")
f39caf44
KS
149 ("Stephen A. Wood" "(saw@cebaf.gov)")
150 ("Steven L. Baur" "SL Baur" "Steven L Baur")
93da04c0 151 ("Stewart M. Clamen" "Stewart Clamen")
6b5e47dd 152 ("Stuart D. Herring" "Stuart Herring" "Davis Herring")
93da04c0 153 ("Taichi Kawabata" "KAWABATA,? Taichi")
f39caf44 154 ("Takaaki Ota" "Tak Ota")
4ee02020 155 ("Takahashi Naoto" "Naoto Takahashi")
d0f483e8 156 ("Teodor Zlatanov" "Ted Zlatanov")
6b5e47dd
GM
157 ("Thomas Horsley" "Tom Horsley") ; FIXME ?
158 ("Thomas Wurgler" "Tom Wurgler")
159 ("Tomohiko Morioka" "MORIOKA Tomohiko")
25b30b16
GM
160 ("Torbjörn Axelsson" "Torbjvrn Axelsson")
161 ("Torbjörn Einarsson" "Torbj.*rn Einarsson")
f39caf44 162 ("Toru Tomabechi" "Toru Tomabechi,")
6b5e47dd 163 ("Tsugutomo Enami" "enami tsugutomo")
f39caf44 164 ("Vincent Del Vecchio" "Vince Del Vecchio")
9109bf49 165 ("William M. Perry" "Bill Perry")
f39caf44 166 ("Wlodzimierz Bzyl" "W.*dek Bzyl")
6b5e47dd
GM
167 ("Yoni Rabkin" "Yoni Rabkin Katzenell")
168 ("Yoshinori Koseki" "KOSEKI Yoshinori" "小関 吉則")
f39caf44 169 ("Yutaka NIIBE" "NIIBE Yutaka")
d5ab63b2 170 )
3215096c
GM
171 "Alist of author aliases.
172
f39caf44 173Each entry is of the form (REALNAME REGEXP...). If an author's name
a1506d29 174matches one of the REGEXPs, use REALNAME instead.
f39caf44 175If REALNAME is nil, ignore that author.")
3215096c 176
eef72fce
GM
177(defconst authors-fixed-case
178 '("Bryan O'Sullivan"
179 "Christian von Roques"
93da04c0 180 "Christophe de Dinechin"
eef72fce
GM
181 "Craig McDaniel"
182 "David J. MacKenzie"
183 "David McCabe"
184 "David O'Toole"
185 "Dominique de Waleffe"
186 "Edward O'Connor"
187 "Exal de Jesus Garcia Carrillo"
188 "Greg McGary"
189 "Hans de Graaff"
190 "James TD Smith"
24e15888 191 "Joel N. Weber II"
eef72fce
GM
192 "Michael McNamara"
193 "Mike McEwan"
6b5e47dd 194 "Nelson Jose dos Santos Ferreira"
eef72fce
GM
195 "Peter von der Ahe"
196 "Peter O'Gorman"
197 "Roland McGrath"
198 "Sean O'Rourke")
199 "List of authors whose names cannot be simply capitalized.")
3215096c 200
0a521885 201(defvar authors-public-domain-files
eef72fce 202 '("emerge\\.el"
0a521885
GM
203 "vi\\.el"
204 "feedmail\\.el"
205 "mailpost\\.el"
206 "hanoi\\.el"
207 "meese\\.el"
208 "studly\\.el"
eef72fce
GM
209 "modula2\\.el"
210 "nnmaildir\\.el"
211 "nnil\\.el"
212 "b2m\\.c"
213 "unexhp9k800\\.c"
214 "emacsclient\\.1"
215 "check-doc-strings")
0a521885
GM
216 "List of regexps matching files for which the FSF doesn't need papers.")
217
218
8a5506f2
GM
219(defvar authors-obsolete-files-regexps
220 '("vc-\\*\\.el$"
221 "spec.txt$"
6b5e47dd 222 ".*loaddefs.el$" ; not obsolete, but auto-generated
8a5506f2
GM
223 "vc-\\(rcs\\|cvs\\|sccs\\)-hooks\\.el$")
224 "List of regexps matching obsolete files.
225Changes to files matching one of the regexps in this list are not
226listed.")
227
4ee02020
KS
228(defconst authors-ignored-files
229 '("external-lisp"
230 "lock" "share-lib" "local-lisp"
231 "noleim-Makefile.in"
eef72fce
GM
232 "NEWS" "ORDERS" "PROBLEMS" "FAQ" "AUTHORS" "FOR-RELEASE" "TODO" "todo"
233 "MACHINES" "SERVICE"
234 "README.unicode" "README.multi-tty" "TUTORIAL.translators"
235 "NEWS.unicode" "COPYING.DJ" "Makefile.old" "Makefile.am"
236 "NEWS.1" "OOOOONEWS...OONEWS" "OOOONEWS" "etc/NEWS"
237 "NEWS.1-17" "NEWS.18" "NEWS.19" "NEWS.20" "NEWS.21" "NEWS.22"
6b5e47dd 238 "MAINTAINERS" "MH-E-NEWS"
eef72fce
GM
239 "install-sh" "missing" "mkinstalldirs"
240 "termcap.dat" "termcap.src" "termcap.ucb" "termcap"
241 "ChangeLog.nextstep" "Emacs.clr" "spec.txt"
242 "gfdl.1"
243 "texi/Makefile.in"
244 "Imakefile" "icons/sink.ico" "aixcc.lex"
245 "nxml/char-name/unicode"
6b5e47dd
GM
246 ;; Autogen:
247 "cus-load.el" "finder-inf.el" "ldefs-boot.el"
eef72fce
GM
248 ;; Never had any meaningful changes logged, now deleted:
249 "split-man" "Xkeymap.txt" "ms-7bkermit" "ulimit.hack"
93da04c0 250 "gnu-hp300" "refcard.bit" "ledit.l" "forms.README" "forms-d2.dat"
eef72fce
GM
251 "CXTERM-DIC/PY.tit" "CXTERM-DIC/ZIRANMA.tit"
252 "CXTERM-DIC/CTLau.tit" "CXTERM-DIC/CTLauB.tit"
253 "NICKLES.WORTH" "INTERVAL.IDEAS" "RCP"
254 "3B-MAXMEM" "AIX.DUMP" "SUN-SUPPORT" "XENIX"
255 "CODINGS" "CHARSETS"
256 "calc/INSTALL" "calc/Makefile"
257 "vms-pp.trans" "_emacs" "batcomp.com"
258 ;; MH-E stuff not in Emacs:
259 "import-emacs" "release-utils"
260 ;; Erc stuff not in Emacs:
261 "ChangeLog.2001" "ChangeLog.2002" "ChangeLog.2003" "ChangeLog.2004"
262 "ChangeLog.2005"
263 "README.extras" "dir-template" "mkChangeLog" "MkChangeLog" "erc-auto.in"
264 "CREDITS" "HACKING"
265 "debian/changelog"
266 "debian/control"
267 "debian/copyright"
268 "debian/maint/conffiles"
269 "debian/maint/conffiles.in"
270 "debian/maint/postinst"
271 "debian/maint/postinst.in"
272 "debian/maint/prerm"
273 "debian/maint/prerm.in"
274 "debian/README.Debian"
275 "debian/README.erc-speak"
276 "debian/rules"
277 "debian/scripts/install"
278 "debian/scripts/install.in"
279 "debian/scripts/remove"
280 "debian/scripts/remove.in"
281 "debian/scripts/startup"
282 "debian/scripts/startup.erc"
283 "debian/scripts/startup.erc-speak"
284 )
4ee02020
KS
285 "List of files and directories to ignore.
286Changes to files in this list are not listed.")
8a5506f2 287
6b5e47dd
GM
288;; FIXME :cowrote entries here can be overwritten by :wrote entries
289;; derived from a file's Author: header (eg mh-e). This really means
290;; the Author: header is erroneous.
d5ab63b2 291(defconst authors-fixed-entries
8b1163a3 292 '(("Richard M. Stallman" :wrote "[The original GNU Emacs and numerous files]")
f39caf44 293 ("Joseph Arceneaux" :wrote "xrdb.c")
6b5e47dd
GM
294 ;; This refers to the obsolete Willisson (qv) version.
295;;; ("Blitz Product Development Corporation" :wrote "ispell.el")
d5ab63b2
GM
296 ("Frank Bresz" :wrote "diff.el")
297 ("David M. Brown" :wrote "array.el")
93da04c0
GM
298 ;; No longer distributed.
299;;; ("Gary Byers" :changed "xenix.h")
d5ab63b2 300 ("Shawn M. Carey" :wrote "freebsd.h")
93da04c0 301 ;; hp800.h renamed from hp9000s800.h, hpux.h merged into hpux10-20.h.
6b5e47dd
GM
302 ;; FIXME overwritten by Author:.
303 ("Satyaki Das" :cowrote "mh-search.el")
93da04c0
GM
304 ("Eric Decker" :changed "hp800.h" "hpux10-20.h" "sysdep.c")
305 ("Lawrence R. Dodd" :cowrote "dired-x.el")
306 ;; No longer distributed.
307;;; ("Viktor Dukhovni" :wrote "unexsunos4.c")
d5ab63b2
GM
308 ("Paul Eggert" :wrote "rcs2log" "vcdiff")
309 ("Fred Fish" :changed "unexec.c")
93da04c0
GM
310 ;; No longer distributed.
311;;; ("Tim Fleehart" :wrote "makefile.nt")
d5ab63b2
GM
312 ("Keith Gabryelski" :wrote "hexl.c")
313 ("Kevin Gallagher" :wrote "flow-ctrl.el")
93da04c0
GM
314 ;; Also wrote an earlier version of disp-table.el, since replaced
315 ;; by Erik Naggum's version; also iso-syntax.el, later renamed to
316 ;; latin-1.el, since deleted.
317 ("Howard Gayle" :wrote "casetab.c")
318 ;; :wrote mh-pick.el, since merged into mh-search.el.
6b5e47dd
GM
319 ;; Originally wrote mh-funcs.el, but it has been rewritten since.
320 ("Stephen Gildea" :wrote "refcard.tex"
321 :cowrote "mh-funcs.el" "mh-search.el")
93da04c0
GM
322 ;; cl.texinfo renamed to cl.texi.
323 ("David Gillespie" :wrote "cl.texi")
324 ;; No longer distributed: emacsserver.c.
325 ("Hewlett-Packard" :changed "emacsclient.c" "server.el" "keyboard.c")
326 ;; No longer distributed.
327;;; ("Thomas Horsley" :wrote "cxux.h" "cxux7.h")
d5ab63b2
GM
328 ("Indiana University Foundation" :changed "buffer.c" "buffer.h"
329 "indent.c" "search.c" "xdisp.c" "region-cache.c" "region-cache.h")
93da04c0 330 ;; ibmrt.h, ibmrt-aix.h no longer distributed.
d5ab63b2 331 ("International Business Machines" :changed "emacs.c" "fileio.c"
93da04c0
GM
332 "process.c" "sysdep.c" "unexec.c")
333 ;; No longer distributed.
334;;; ("Ishikawa Chiaki" :changed "aviion.h" "dgux.h")
335 ;; ymakefile no longer distributed.
d5ab63b2 336 ("Michael K. Johnson" :changed "configure.in" "emacs.c" "intel386.h"
93da04c0
GM
337 "mem-limits.h" "process.c" "template.h" "sysdep.c" "syssignal.h"
338 "systty.h" "unexec.c" "linux.h")
339 ;; No longer distributed.
340;;; ("Kyle Jones" :wrote "mldrag.el")
4ee02020 341 ("Henry Kautz" :wrote "bib-mode.el")
93da04c0
GM
342 ;; No longer distributed: vms-pwd.h, vmsfns.c, uaf.h.
343 ("Joseph M. Kelsey" :changed "fileio.c" "dir.h")
d5ab63b2 344 ("Sam Kendall" :changed "etags.c" "etags.el")
93da04c0
GM
345 ;; ack.texi: "We're not using his backquote.el any more."
346 ("Richard King" :wrote "userlock.el" "filelock.c")
d5ab63b2
GM
347 ("Sebastian Kremer" :changed "add-log.el")
348 ("Mark Lambert" :changed "process.c" "process.h")
349 ("Aaron Larson" :changed "bibtex.el")
6b5e47dd
GM
350 ;; It was :wrote, but it has been rewritten since.
351 ("James R. Larus" :cowrote "mh-e.el")
93da04c0
GM
352 ("Lars Lindberg" :changed "dabbrev.el" :cowrote "imenu.el")
353 ;; No longer distributed: lselect.el.
d5ab63b2
GM
354 ("Lucid, Inc." :changed "bytecode.c" "byte-opt.el" "byte-run.el"
355 "bytecomp.el" "delsel.el" "disass.el" "faces.el" "font-lock.el"
93da04c0 356 "lmenu.el" "mailabbrev.el" "select.el" "xfaces.c" "xselect.c")
6b5e47dd
GM
357 ;; MCC. No longer distributed: emacsserver.c.
358 ("Microelectronics and Computer Technology Corporation"
359 :changed "etags.c" "emacsclient.c" "movemail.c"
d5ab63b2
GM
360 "rmail.el" "rmailedit.el" "rmailkwd.el"
361 "rmailmsc.el" "rmailout.el" "rmailsum.el" "scribe.el"
6b5e47dd
GM
362 ;; It was :wrote for xmenu.c, but it has been rewritten since.
363 "server.el" "lisp.h" "sysdep.c" "unexec.c" "xmenu.c")
d5ab63b2 364 ("Niall Mansfield" :changed "etags.c")
93da04c0 365 ("Brian Marick" :cowrote "hideif.el")
d5ab63b2
GM
366 ("Marko Kohtala" :changed "info.el")
367 ("Sidney Markowitz" :changed "doctor.el")
93da04c0
GM
368 ;; No longer distributed: env.c.
369 ("Richard Mlynarik" :wrote "ehelp.el")
d5ab63b2
GM
370 ("Mosur Mohan" :changed "etags.c")
371 ("Jeff Morgenthaler" :changed "flow-ctrl.el" "vt200.el" "vt201.el"
372 "vt220.el" "vt240.el")
373 ("Motorola" :changed "buff-menu.el")
374 ("Hiroshi Nakano" :changed "ralloc.c")
375 ("Sundar Narasimhan" :changed "rnewspost.el")
93da04c0
GM
376 ;; No longer distributed.
377;;; ("NeXT, Inc." :wrote "unexnext.c")
d5ab63b2 378 ("Mark Neale" :changed "fortran.el")
93da04c0
GM
379 ;; Renamed from sc.el.
380 ("Martin Neitzel" :changed "supercite.el")
381 ("Andrew Oram" :changed "calendar.texi (and other files in man/)")
d5ab63b2
GM
382 ("Frederic Pierresteguy" :wrote "widget.c")
383 ("Michael D. Prange" :changed "tex-mode.el")
93da04c0
GM
384 ;; No longer distributed (dgux5-4r3.h was renamed to dgux5-4-3.h).
385;;; ("Paul Reilly" :wrote "gux5-4r2.h" "dgux5-4-3.h")
386 ("Roland B. Roberts" :changed "files.el" "sort.el"
387 "buffer.h" "callproc.c" "dired.c" "process.c" "sysdep.c" "systty.h")
388 ;; No longer distributed.
389;;; "vmspaths.h" "build.com" "compile.com" "kepteditor.com" "precomp.com"
390;;; "vmsproc.el" :wrote "logout.com" "mailemacs.com")
d5ab63b2
GM
391 ("Guillermo J. Rozas" :wrote "fakemail.c")
392 ("Wolfgang Rupprecht" :changed "lisp-mode.el" "loadup.el"
393 "sort.el" "alloc.c" "callint.c"
93da04c0
GM
394 ;; config.in renamed from config.h.in; ecrt0.c from crt0.c.
395 "config.in" "ecrt0.c" "data.c" "fns.c"
396 "lisp.h" "lread.c" ; "sun3.h" "ymakefile" - no longer distributed
397 "print.c" :wrote "float-sup.el" "floatfns.c")
d5ab63b2 398 ("Schlumberger Technology Corporation" :changed "gud.el")
93da04c0
GM
399 ;; Replaced by tcl.el.
400;;; ("Gregor Schmid" :wrote "tcl-mode.el")
d5ab63b2 401 ("Rainer Schoepf" :wrote "alpha.h" "unexalpha.c")
93da04c0
GM
402 ;; No longer distributed: emacsserver.c.
403 ("William Sommerfeld" :wrote "emacsclient.c" "scribe.el")
404 ;; No longer distributed: emacsserver.c.
405 ("Leigh Stoller" :changed "emacsclient.c" "server.el")
d5ab63b2
GM
406 ("Steve Strassman" :wrote "spook.el")
407 ("Shinichirou Sugou" :changed "etags.c")
93da04c0
GM
408 ;; No longer distributed: emacsserver.c.
409 ("Sun Microsystems, Inc" :changed "emacsclient.c" "server.el"
410 :wrote "emacs.icon" "sun.el")
411 ;; No longer distributed.
412;;; "emacstool.1" "emacstool.c" "sun-curs.el"
413;;; "sun-fns.el" "sun-mouse.el" "sunfns.c")
414 ;; Renamed from sc.el.
415 ("Kayvan Sylvan" :changed "supercite.el")
416 ;; No longer distributed: emacsserver.c, tcp.c.
417 ("Spencer Thomas" :changed "emacsclient.c" "server.el"
418 "dabbrev.el" "unexec.c" "gnus.texi")
d5ab63b2
GM
419 ("Jonathan Vail" :changed "vc.el")
420 ("James Van Artsdalen" :changed "usg5-4.h" "unexec.c")
93da04c0
GM
421 ;; No longer distributed: src/makefile.nt, lisp/makefile.nt
422 ;; winnt.el renamed to w32-fns.el; nt.[ch] to w32.[ch];
423 ;; ntheap.[ch] to w32heap.[ch]; ntinevt.c to w32inevt.c;
424 ;; ntproc.c to w32proc.c; ntterm.c to w32term.c;
425 ;; windowsnt.h to ms-w32.h.
426 ("Geoff Voelker" :wrote "w32-fns.el" "w32.c" "w32.h" "w32heap.c"
427 "w32heap.h" "w32inevt.c" "w32proc.c" "w32term.c" "ms-w32.h")
8fc29035 428 ("Morten Welinder" :wrote "dosfns.c" "[many MS-DOS files]" "msdos.h")
93da04c0
GM
429 ;; Not using this version any more.
430;;; ("Pace Willisson" :wrote "ispell.el")
6b5e47dd
GM
431 ;; FIXME overwritten by Author:.
432 ("Bill Wohler" :cowrote "mh-e.el")
d5ab63b2 433 ("Garrett Wollman" :changed "sendmail.el")
9109bf49 434 ("Dale R. Worley" :changed "mail-extr.el")
93da04c0
GM
435 ("Jamie Zawinski" :changed "bytecode.c" :wrote "tar-mode.el"
436 :cowrote "disass.el"))
d5ab63b2
GM
437 "Actions taken from the original, manually (un)maintained AUTHORS file.")
438
439
f39caf44
KS
440(defconst authors-valid-file-names
441 '("aclocal.m4"
eef72fce
GM
442 "build-ins.in"
443 "Makefile.noleim"
4ee02020 444 "makedist.bat"
eef72fce
GM
445 "makefile.def"
446 "makefile.nt"
447 "debug.bat.in" "emacs.bat.in"
448 ".gdbinit-union"
449 "alloca.s"
450 "make-delta"
451 "config.w95"
452 "emacstool.1"
453 "align.umax"
454 "cxux-crt0.s"
455 "gould-sigvec.s"
456 "getdate.y"
457 "ymakefile"
458 "permute-index" "index.perm"
93da04c0 459 "emacs.ico"
eef72fce
GM
460 "emacs21.ico"
461 "LPF" "LEDIT" "OTHER.EMACSES"
462 "emacs16_mac.png" "emacs24_mac.png"
463 "emacs256_mac.png" "emacs32_mac.png"
464 "emacs48_mac.png" "emacs512_mac.png"
465 ;; Deleted vms stuff:
466 "temacs.opt" "descrip.mms" "compile.com" "link.com"
467 )
468 "File names which are valid, but no longer exist (or cannot be
f39caf44
KS
469found) in the repository.")
470
471(defconst authors-renamed-files-alist
472 '(("nt.c" . "w32.c") ("nt.h" . "w32.h")
473 ("ntheap.c" . "w32heap.c") ("ntheap.h" . "w32heap.h")
474 ("ntinevt.c" . "w32inevt.c") ("ntinevt.h" . "w32inevt.h")
475 ("ntproc.c" . "w32proc.c")
476 ("w32console.c" . "w32term.c")
477 ("unexnt.c" . "unexw32.c")
478 ("s/windowsnt.h" . "s/ms-w32.h")
93da04c0 479 ("winnt.el" . "w32-fns.el")
f39caf44 480 ("config.emacs" . "configure")
93da04c0
GM
481 ("config.h.dist" . "config.in")
482 ("config.h-dist" . "config.in")
483 ("config.h.in" . "config.in")
eef72fce
GM
484 ("paths.h-dist" . "paths.h.in")
485 ("patch1" . "sed1.inp")
f39caf44 486 ("GETTING.GNU.SOFTWARE" . "FTP")
eef72fce
GM
487 ("etc/MACHINES" . "MACHINES")
488 ("ONEWS" . "NEWS.19")
489 ("ONEWS.1" . "NEWS.1-17")
490 ("ONEWS.2" . "NEWS.1-17")
491 ("ONEWS.3" . "NEWS.18")
492 ("ONEWS.4" . "NEWS.18")
493 ("ORDERS.USA" . "ORDERS")
494 ("EUROPE" . "ORDERS")
495 ("DIFF" . "OTHER.EMACSES")
496 ("CCADIFF" . "OTHER.EMACSES")
497 ("GOSDIFF" . "OTHER.EMACSES")
498 ("Makefile.in.in" . "Makefile.in")
4ee02020
KS
499 ("leim-Makefile" . "leim/Makefile")
500 ("leim-Makefile.in" . "leim/Makefile.in")
92158bc3
KS
501 ("emacs-lisp/testcover-ses.el" . "tcover-ses.el")
502 ("emacs-lisp/testcover-unsafep.el" . "tcover-unsafep.el")
6b5e47dd
GM
503 ;; index and pick merged into search.
504 ("mh-index.el" . "mh-search.el")
505 ("mh-pick.el" . "mh-search.el")
4ee02020 506 ("INSTALL-CVS" . "INSTALL.CVS")
eef72fce
GM
507 ("refcards/fr-drdref.pdf" . "refcards/fr-dired-ref.pdf")
508 ("gnus-logo.eps" . "refcards/gnus-logo.eps")
509 ("build-install" . "build-ins.in")
510 ("build-install.in" . "build-ins.in")
511 ("unidata/Makefile" . "unidata/Makefile.in")
512 ;; Not renamed, but we only have the latter in the Emacs repo.
513 ("trampver.texi.in" . "trampver.texi")
514 ("e/eterm" . "e/eterm-color")
515 ("e/eterm.ti" . "e/eterm-color.ti")
516 ("README.txt" . "README")
517 ("emacs.names" . "JOKES")
518 ("ED.WORSHIP" . "JOKES")
519 ("GNU.JOKES" . "JOKES")
520 ("CHARACTERS" . "TODO")
521 ("schema/xhtml-basic-form.rnc" . "schema/xhtml-bform.rnc" )
522 ("schema/xhtml-basic-table.rnc" . "schema/xhtml-btable.rnc")
523 ("schema/xhtml-list.rnc" . "schema/xhtml-lst.rnc")
524 ("schema/xhtml-target.rnc" . "schema/xhtml-tgt.rnc")
525 ("schema/xhtml-style.rnc" . "schema/xhtml-xstyle.rnc")
526 ("schema/docbook-dyntbl.rnc" . "schema/docbk-dyntbl.rnc")
527 ("schema/docbook-soextbl.rnc" . "schema/docbk-soextbl.rn" )
528 ("texi/url.txi" . "url.texi")
529 ;; Moved to different directories.
530 ("ctags.1" . "ctags.1")
531 ("etags.1" . "etags.1")
532 ("emacs.1" . "emacs.1")
533 ("emacsclient.1" . "emacsclient.1")
534 ("icons/emacs21.ico" . "emacs21.ico")
f39caf44
KS
535 )
536 "Alist of files which have been renamed during their lifetime.
537Elements are (OLDNAME . NEWNAME).")
538
539(defconst authors-renamed-files-regexps
540 '(("^m/m-\\(.*\\.h\\)$" . "m/\\1")
541 ("^m-\\(.*\\.h\\)$" . "\\1")
542 ("^s/s-\\(.*\\.h\\)$" . "s/\\1")
543 ("^s-\\(.*\\.h\\)$" . "\\1")
544 ("^s/[-.a-zA-Z0-9_]+\\.h$" . t)
545 ("\\(.*\\)\\.cmd$" . "\\1.bat")
546 ("\\.bat$" . t)
547 ("\\.[ch]$" . t)
548 ("\\.el$" . t)
549 ("\\.ps$" . t)
550 ("\\.texi?$" . t)
551 ("\\.texinfo$" . t)
552 ("\\.xml?$" . t)
553 ("\\.x[pb]m$" . t)
554 ("\\.[xp]bm$" . t)
555 ("^paths\\." . t)
556 ("^install\\." . t)
eef72fce
GM
557 ("^\\(TUTORIAL[^/]*\\)" . "tutorials/\\1")
558 ("^\\(tree-widget/\\(?:default\\|folder\\)/[-a-z]+\\.png\\)$" .
559 "images/\\1")
560 ("^\\(images/icons/\\)mac\\(emacs\\)_\\([0-9]+\\)\\(\\.png\\)" .
561 "\\1\\2\\3_mac\\4")
562 ("\\(images/icons/\\)emacs_\\([0-9][0-9]\\)\\.png" .
563 "\\1hicolor/\\2x\\2/apps/emacs.png")
f39caf44
KS
564 )
565 "List regexps and rewriting rules for renamed files.
566Elements are (REGEXP . REPLACE). If REPLACE is a string, the file
567name matching REGEXP is replaced by REPLACE using `replace-string'.
568Otherwise, the file name is accepted as is.")
569
570(defvar authors-checked-files-alist)
571(defvar authors-invalid-file-names)
572
573(defun authors-canonical-file-name (file log-file pos author)
6b5e47dd 574 "Return canonical file name for FILE found in LOG-FILE.
f39caf44
KS
575Checks whether FILE is a valid (existing) file name, has been renamed,
576or is on the list of removed files. Returns the non-diretory part of
6b5e47dd
GM
577the file name. Only uses the LOG-FILE position POS and associated AUTHOR
578to print a message if FILE is not found."
93da04c0
GM
579 ;; FILE should be re-checked in every different directory associated
580 ;; with a LOG-FILE. Eg configure.in from src/ChangeLog is not the
581 ;; same as that from top-level/ChangeLog.
582 (let* ((fullname (expand-file-name file (file-name-directory log-file)))
583 (entry (assoc fullname authors-checked-files-alist))
584 relname
585 valid)
f39caf44
KS
586 (if entry
587 (cdr entry)
588 (setq relname (file-name-nondirectory file))
589 (if (or (member relname authors-valid-file-names)
590 (file-exists-p file)
591 (file-exists-p relname)
592 (file-exists-p (concat "etc/" relname)))
593 (setq valid relname)
594 (setq valid (assoc file authors-renamed-files-alist))
595 (if valid
596 (setq valid (cdr valid))
597 (let ((rules authors-renamed-files-regexps))
598 (while rules
599 (if (string-match (car (car rules)) file)
600 (setq valid (if (stringp (cdr (car rules)))
601 (file-name-nondirectory
602 (replace-match (cdr (car rules)) t nil file))
603 relname)
604 rules nil))
605 (setq rules (cdr rules))))))
606 (setq authors-checked-files-alist
93da04c0 607 (cons (cons fullname valid) authors-checked-files-alist))
9109bf49 608 (unless (or valid
eef72fce 609 (member file authors-ignored-files)
9109bf49
KS
610 (string-match "[*]" file)
611 (string-match "^[0-9.]+$" file))
a1506d29 612 (setq authors-invalid-file-names
f39caf44
KS
613 (cons (format "%s:%d: unrecognized `%s' for %s"
614 log-file
615 (1+ (count-lines (point-min) pos))
616 file author)
617 authors-invalid-file-names)))
618 valid)))
619
d5ab63b2
GM
620(defun authors-add-fixed-entries (table)
621 "Add actions from `authors-fixed-entries' to TABLE."
622 (dolist (entry authors-fixed-entries)
623 (let ((author (car entry))
624 action)
625 (dolist (item (cdr entry))
626 (if (symbolp item)
627 (setq action item)
628 (authors-add author item action table))))))
629
3932b29a 630
8a5506f2
GM
631(defun authors-obsolete-file-p (file)
632 "Return non-nil if FILE is obsolete.
3932b29a 633FILE is considered obsolete if it matches one of the regular expressions
8a5506f2
GM
634from `authors-obsolete-files-regexps'."
635 (let (obsolete-p
636 (regexps authors-obsolete-files-regexps))
637 (while (and regexps (not obsolete-p))
638 (setq obsolete-p (string-match (car regexps) file)
639 regexps (cdr regexps)))
640 obsolete-p))
641
642
3215096c
GM
643(defun authors-add (author file action table)
644 "Record that AUTHOR worked on FILE.
645ACTION is a keyword symbol describing what he did. Record file,
646author and what he did in hash table TABLE. See the description of
647`authors-scan-change-log' for the structure of the hash table."
4ee02020
KS
648 (unless (or (member file authors-ignored-files)
649 (authors-obsolete-file-p file)
9c1af546 650 (equal author ""))
8a5506f2 651 (let* ((value (gethash author table))
f39caf44
KS
652 (entry (assoc file value))
653 slot)
8a5506f2 654 (if (null entry)
f39caf44
KS
655 (puthash author (cons (list file (cons action 1)) value) table)
656 (if (setq slot (assoc action (cdr entry)))
657 (setcdr slot (1+ (cdr slot)))
658 (nconc entry (list (cons action 1))))))))
3215096c
GM
659
660
3215096c
GM
661(defun authors-canonical-author-name (author)
662 "Return a canonicalized form of AUTHOR, an author name.
eef72fce
GM
663If AUTHOR has an entry in `authors-aliases', use that. Remove
664email addresses. Capitalize words in the author's name, unless
665it is found in `authors-fixed-case'."
f39caf44
KS
666 (let* ((aliases authors-aliases)
667 regexps realname)
3215096c 668 (while aliases
f39caf44
KS
669 (setq realname (car (car aliases))
670 regexps (cdr (car aliases))
671 aliases (cdr aliases))
672 (while regexps
673 (if (string-match (car regexps) author)
674 (setq author realname
675 regexps nil
676 aliases nil)
677 (setq regexps (cdr regexps))))))
678 (when author
679 (setq author (replace-regexp-in-string "[ \t]*[(<].*$" "" author))
d0f483e8 680 (setq author (replace-regexp-in-string "\`[ \t]+" "" author))
f39caf44 681 (setq author (replace-regexp-in-string "[ \t]+$" "" author))
d0f483e8
KS
682 (setq author (replace-regexp-in-string "[ \t]+" " " author))
683 (unless (string-match "[-, \t]" author)
684 (setq author ""))
eef72fce
GM
685 (or (car (member author authors-fixed-case))
686 (capitalize author))))
f39caf44 687
f39caf44
KS
688(defun authors-scan-change-log (log-file table)
689 "Scan change log LOG-FILE for author information.
3215096c
GM
690
691For each change mentioned in the log, add an entry to hash table TABLE
692under the author's canonical name.
693
694Keys of TABLE are author names. Values are alists of entries (FILE
f39caf44
KS
695\(ACTION . COUNT) ...). FILE is one file the author worked on. The
696rest of the entry is a list of keyword symbols describing what he did
2603d79b 697with the file and the number of each action:
3215096c
GM
698
699:wrote means the author wrote the file
2603d79b 700:cowrote means he wrote the file in collaboration with others
f39caf44 701:changed means he changed the file COUNT times."
3932b29a 702
2603d79b 703 (let* ((enable-local-variables :safe) ; for find-file, hence let*
68013cfa 704 (enable-local-eval nil)
f39caf44
KS
705 (existing-buffer (get-file-buffer log-file))
706 (buffer (find-file-noselect log-file))
6b5e47dd 707 authors file pos)
3215096c
GM
708 (save-excursion
709 (set-buffer buffer)
710 (save-restriction
711 (widen)
712 (goto-char (point-min))
713 (while (re-search-forward "^[0-9]\\|^[ \t]+\\* " nil t)
714 (beginning-of-line)
f39caf44 715 (setq pos (point))
3215096c 716 (cond ((looking-at "^[0-9]+-[0-9]+-[0-9]+")
6b5e47dd
GM
717 ;; Handle joint authorship of changes.
718 ;; This can be a bit fragile, and is not too common.
719 (setq authors nil)
720 (while (progn
721 (skip-chars-forward " \t+:0-9-")
722 (not (looking-at "\\($\\|\\*\\|\
723Suggested\\|Trivial\\|Version\\|Originally\\|From:\\|Patch[ \t]+[Bb]y\\)")))
724 (push (authors-canonical-author-name
725 (buffer-substring-no-properties
726 (point) (line-end-position))) authors)
727 (forward-line 1)))
3215096c
GM
728 ((looking-at "^[ \t]+\\*")
729 (let ((line (buffer-substring-no-properties
730 (match-end 0) (line-end-position))))
731 (while (and (not (string-match ":" line))
732 (forward-line 1)
733 (not (looking-at ":\\|^[ \t]*$")))
734 (setq line (concat line
735 (buffer-substring-no-properties
736 (line-beginning-position)
737 (line-end-position)))))
738 (when (string-match ":" line)
739 (setq line (substring line 0 (match-beginning 0)))
740 (setq line (replace-regexp-in-string "[[(<{].*$" "" line))
741 (setq line (replace-regexp-in-string "," "" line))
742 (dolist (file (split-string line))
6b5e47dd
GM
743 (when (setq file (authors-canonical-file-name file log-file pos (car authors)))
744 (dolist (author authors)
745 ;;(message "%s changed %s" author file)
746 (authors-add author file :changed table)))))
3215096c
GM
747 (forward-line 1)))))))
748 (unless existing-buffer
749 (kill-buffer buffer))))
750
751
752(defun authors-scan-el (file table)
753 "Scan Lisp file FILE for author information.
754TABLE is a hash table to add author information to."
2603d79b
GM
755 (let* ((existing-buffer (get-file-buffer file))
756 (enable-local-variables :safe) ; for find-file, hence let*
757 (enable-local-eval nil)
758 (buffer (find-file-noselect file)))
93da04c0 759 (setq file (file-name-nondirectory file))
3215096c
GM
760 (save-excursion
761 (set-buffer buffer)
762 (save-restriction
763 (widen)
764 (goto-char (point-min))
765 (while (and (re-search-forward
93da04c0
GM
766 "^;+[ \t]*\\(Authors?\\|Commentary\\|Code\\):[ \t]*" nil t)
767 (not (member (match-string 1) '("Commentary" "Code"))))
768 (let ((continue t)
769 (action :wrote)
770 authors)
771 (while continue
772 ;; Some entries contain a year range in front of the
773 ;; author's name.
774 (skip-chars-forward "-0-9 \t")
775 (push (authors-canonical-author-name
776 (buffer-substring-no-properties
777 (point) (line-end-position))) authors)
778 ;; tips.texi says the continuation line should begin
779 ;; with a tab, but often spaces are used.
780 (setq continue
781 (and (zerop (forward-line 1))
782 (looking-at ";;;?\\(\t+ *\\| +\\)[[:alnum:]]")
783 (goto-char (1- (match-end 0)))
784 (not (looking-at "[[:upper:]][-[:alpha:]]+:[ \t]")))))
785 (and (> (length authors) 1)
786 (setq action :cowrote))
787 (mapc (lambda (author)
788 (authors-add author file action table))
789 authors)))))
3215096c
GM
790 (unless existing-buffer
791 (kill-buffer buffer))))
792
793
0a521885
GM
794(defun authors-public-domain-p (file)
795 "Return t if FILE is a file that was put in public domain."
796 (let ((public-domain-p nil)
797 (list authors-public-domain-files))
798 (while (and list (not public-domain-p))
799 (when (string-match (car list) file)
800 (setq public-domain-p t))
801 (setq list (cdr list)))
802 public-domain-p))
803
f39caf44
KS
804(defvar authors-author-list)
805
806(defun authors-add-to-author-list (author changes)
807 "Insert information about AUTHOR's work on Emacs into `authors-author-list'.
808CHANGES is an alist of entries (FILE (ACTION . COUNT) ...), as produced by
809`authors-scan-change-log'.
93da04c0
GM
810The element added to `authors-author-list' is (AUTHOR WROTE CO-WROTE CHANGED),
811where WROTE, CO-WROTE, and CHANGED are lists of the files written, co-written
812and changed by AUTHOR."
f39caf44
KS
813 (when author
814 (let ((nchanged 0)
815 wrote-list
93da04c0 816 cowrote-list
f39caf44 817 changed-list)
3215096c 818 (dolist (change changes)
93da04c0
GM
819 (let* ((actions (cdr change))
820 (file (car change))
821 (filestat (if (authors-public-domain-p file)
822 (concat file " (public domain)")
823 file))
824 slot)
825 (cond ((assq :wrote actions)
826 (setq wrote-list (cons filestat wrote-list)))
827 ((assq :cowrote actions)
828 (setq cowrote-list (cons filestat cowrote-list)))
829 (t
830 (setq changed-list
831 (cons (cons file (cdr (assq :changed actions)))
832 changed-list))))))
f39caf44
KS
833 (if wrote-list
834 (setq wrote-list (sort wrote-list 'string-lessp)))
93da04c0
GM
835 (if cowrote-list
836 (setq cowrote-list (sort cowrote-list 'string-lessp)))
f39caf44
KS
837 (when changed-list
838 (setq changed-list (sort changed-list
839 (lambda (a b)
840 (if (= (cdr a) (cdr b))
841 (string-lessp (car a) (car b))
842 (> (cdr a) (cdr b))))))
843 (setq nchanged (length changed-list))
844 (setq changed-list (mapcar 'car changed-list)))
845 (if (> (- nchanged authors-many-files) 2)
846 (setcdr (nthcdr authors-many-files changed-list)
847 (list (format "and %d other files" (- nchanged authors-many-files)))))
848 (setq authors-author-list
93da04c0 849 (cons (list author wrote-list cowrote-list changed-list)
f39caf44 850 authors-author-list)))))
3215096c 851
3215096c
GM
852(defun authors (root)
853 "Extract author information from change logs and Lisp source files.
854ROOT is the root directory under which to find the files. If called
a1506d29 855interactively, ROOT is read from the minibuffer.
f39caf44
KS
856Result is a buffer *Authors* containing authorship information, and a
857buffer *Authors Errors* containing references to unknown files."
3215096c 858 (interactive "DEmacs source directory: ")
d2f288c6 859 (setq root (expand-file-name root))
c7efbb12 860 (let ((logs (process-lines find-program root "-name" "ChangeLog*"))
3215096c 861 (table (make-hash-table :test 'equal))
f39caf44
KS
862 (buffer-name "*Authors*")
863 authors-checked-files-alist
864 authors-invalid-file-names)
621af279
DK
865 (authors-add-fixed-entries table)
866 (unless (file-exists-p (expand-file-name "src/emacs.c" root))
be3f421b
RS
867 (unless (y-or-n-p
868 (format "Not the root directory of Emacs: %s, continue? " root))
5a0c3f56 869 (error "Not the root directory")))
3215096c 870 (dolist (log logs)
77777daf 871 (when (string-match "ChangeLog\\(.[0-9]+\\)?$" log)
3215096c
GM
872 (message "Scanning %s..." log)
873 (authors-scan-change-log log table)))
c7efbb12 874 (let ((els (process-lines find-program root "-name" "*.el")))
3215096c
GM
875 (dolist (file els)
876 (message "Scanning %s..." file)
877 (authors-scan-el file table)))
f39caf44 878 (message "Generating buffer %s..." buffer-name)
3215096c
GM
879 (set-buffer (get-buffer-create buffer-name))
880 (erase-buffer)
f39caf44 881 (set-buffer-file-coding-system authors-coding-system)
a1506d29 882 (insert
f39caf44
KS
883"Many people have contributed code included in the Free Software
884Foundation's distribution of GNU Emacs. To show our appreciation for
885their public spirit, we list here in alphabetical order a condensed
886list of their contributions.\n")
887 (let (authors-author-list a)
888 (maphash #'authors-add-to-author-list table)
a1506d29 889 (setq authors-author-list
f39caf44
KS
890 (sort authors-author-list
891 (lambda (a b) (string-lessp (car a) (car b)))))
892 (dolist (a authors-author-list)
893 (let ((author (car a))
894 (wrote (nth 1 a))
93da04c0
GM
895 (cowrote (nth 2 a))
896 (changed (nth 3 a))
f39caf44
KS
897 file)
898 (insert "\n" author ": ")
899 (when wrote
900 (insert "wrote")
901 (dolist (file wrote)
902 (if (> (+ (current-column) (length file)) 72)
903 (insert "\n "))
904 (insert " " file))
905 (insert "\n"))
93da04c0 906 (when cowrote
f39caf44
KS
907 (if wrote
908 (insert "and "))
93da04c0
GM
909 (insert "co-wrote")
910 (dolist (file cowrote)
911 (if (> (+ (current-column) (length file)) 72)
912 (insert "\n "))
913 (insert " " file))
914 (insert "\n"))
915 (when changed
916 (if (or wrote cowrote)
917 (insert "and "))
f39caf44
KS
918 (insert "changed")
919 (dolist (file changed)
920 (if (> (+ (current-column) (length file)) 72)
921 (insert "\n "))
922 (insert " " file))
923 (insert "\n")))))
a1506d29 924 (insert "\nLocal" " Variables:\ncoding: "
f39caf44
KS
925 (symbol-name authors-coding-system) "\nEnd:\n")
926 (message "Generating buffer %s... done" buffer-name)
d5ab63b2 927 (unless noninteractive
f39caf44
KS
928 (when authors-invalid-file-names
929 (with-current-buffer (get-buffer-create "*Authors Errors*")
eef72fce 930 (setq buffer-read-only nil)
f39caf44
KS
931 (erase-buffer)
932 (set-buffer-file-coding-system authors-coding-system)
933 (insert "Unrecognized file entries found:\n\n")
0c8b414f
JB
934 (mapc (lambda (f) (if (not (string-match "^[A-Za-z]+$" f)) (insert f "\n")))
935 (sort authors-invalid-file-names 'string-lessp))
f39caf44
KS
936 (goto-char (point-min))
937 (compilation-mode)
938 (message "Errors were found. See buffer %s" (buffer-name))))
d5ab63b2
GM
939 (pop-to-buffer buffer-name))))
940
941
d5ab63b2
GM
942(defun batch-update-authors ()
943 "Produce an AUTHORS file.
944Call this function in batch mode with two command line arguments FILE
945and ROOT. FILE is the file to write, ROOT is the root directory of
946the Emacs source tree, from which to build the file."
947 (unless noninteractive
948 (error "`batch-update-authors' is to be used only with -batch"))
949 (when (/= (length command-line-args-left) 2)
950 (error "Call `batch-update-authors' with the name of the file to write"))
951 (let* ((file (pop command-line-args-left))
952 (root (pop command-line-args-left)))
953 (authors root)
954 (write-file file)))
3215096c 955
c420eb36
GM
956(provide 'authors)
957
cbee283d 958;; arch-tag: 659d5900-5ff2-43b0-954c-a315cc1e4dc1
55535639 959;;; authors.el ends here