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