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