Merge from trunk.
[bpt/emacs.git] / lisp / emacs-lisp / authors.el
1 ;;; authors.el --- utility for maintaining Emacs's 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's 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" "Agustín Martín Domingo")
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 ("Toby Cubitt" "Toby S\\. Cubitt")
174 ("Tomohiko Morioka" "MORIOKA Tomohiko")
175 ("Torbjörn Axelsson" "Torbjvrn Axelsson")
176 ("Torbjörn Einarsson" "Torbj.*rn Einarsson")
177 ("Toru Tomabechi" "Toru Tomabechi,")
178 ("Tsugutomo Enami" "enami tsugutomo")
179 ("Vincent Del Vecchio" "Vince Del Vecchio")
180 ("William M. Perry" "Bill Perry")
181 ("Wlodzimierz Bzyl" "W.*dek Bzyl")
182 ("Yoni Rabkin" "Yoni Rabkin Katzenell")
183 ("Yoshinori Koseki" "KOSEKI Yoshinori" "小関 吉則")
184 ("Yutaka NIIBE" "NIIBE Yutaka")
185 )
186 "Alist of author aliases.
187
188 Each entry is of the form (REALNAME REGEXP...). If an author's name
189 matches one of the REGEXPs, use REALNAME instead.
190 If REALNAME is nil, ignore that author.")
191
192 ;; FIXME seems it would be less fragile to check for O', Mc, etc.
193 (defconst authors-fixed-case
194 '("Bryan O'Sullivan"
195 "Christian von Roques"
196 "Christophe de Dinechin"
197 "Craig McDaniel"
198 "David J. MacKenzie"
199 "David McCabe"
200 "David O'Toole"
201 "Devon Sean McCullough"
202 "Dominique de Waleffe"
203 "Edward O'Connor"
204 "Exal de Jesus Garcia Carrillo"
205 "Greg McGary"
206 "Hans de Graaff"
207 "James TD Smith"
208 "Joel N. Weber II"
209 "Michael McNamara"
210 "Mike McEwan"
211 "Nelson Jose dos Santos Ferreira"
212 "Peter von der Ahe"
213 "Peter O'Gorman"
214 "Piet van Oostrum"
215 "Roland McGrath"
216 "Sean O'Halpin"
217 "Sean O'Rourke"
218 "Tijs van Bakel")
219 "List of authors whose names cannot be simply capitalized.")
220
221 (defvar authors-public-domain-files
222 '("emerge\\.el"
223 "vi\\.el"
224 "feedmail\\.el"
225 "mailpost\\.el"
226 "hanoi\\.el"
227 "meese\\.el"
228 "studly\\.el"
229 "modula2\\.el"
230 "nnmaildir\\.el"
231 "nnil\\.el"
232 "b2m\\.c"
233 "unexhp9k800\\.c"
234 "emacsclient\\.1"
235 "check-doc-strings")
236 "List of regexps matching files for which the FSF doesn't need papers.")
237
238
239 (defvar authors-obsolete-files-regexps
240 '("vc-\\*\\.el$"
241 "spec.txt$"
242 ".*loaddefs.el$" ; not obsolete, but auto-generated
243 "\\.\\(cvs\\|git\\)ignore$" ; obsolete or uninteresting
244 "\\.arch-inventory$"
245 ;; TODO lib/? Matches other things?
246 "build-aux/" "m4/" "Emacs.xcodeproj" "charsets" "mapfiles"
247 "preferences\\.\\(nib\\|gorm\\)"
248 "vc-\\(rcs\\|cvs\\|sccs\\)-hooks\\.el$")
249 "List of regexps matching obsolete files.
250 Changes to files matching one of the regexps in this list are not listed.")
251
252 (defconst authors-ignored-files
253 '("external-lisp"
254 "lock" "share-lib" "local-lisp"
255 "noleim-Makefile.in"
256 "NEWS" "ORDERS" "PROBLEMS" "FAQ" "AUTHORS" "FOR-RELEASE" "TODO" "todo"
257 "MACHINES" "SERVICE"
258 "README.unicode" "README.multi-tty" "TUTORIAL.translators"
259 "NEWS.unicode" "COPYING.DJ" "Makefile.old" "Makefile.am"
260 "NEWS.1" "OOOOONEWS...OONEWS" "OOOONEWS" "etc/NEWS"
261 "NEWS.1-17" "NEWS.18" "NEWS.19" "NEWS.20" "NEWS.21" "NEWS.22"
262 "MAINTAINERS" "MH-E-NEWS"
263 "install-sh" "missing" "mkinstalldirs"
264 "termcap.dat" "termcap.src" "termcap.ucb" "termcap"
265 "ChangeLog.nextstep" "Emacs.clr" "spec.txt"
266 "gfdl.1"
267 "texi/Makefile.in"
268 "Imakefile" "icons/sink.ico" "aixcc.lex"
269 "nxml/char-name/unicode"
270 "js2-mode.el" ; only installed very briefly, replaced by js.el
271 "cedet/tests/testtemplates.cpp"
272 "cedet/tests/testusing.cpp"
273 "cedet/tests/scopetest.cpp"
274 "cedet/tests/scopetest.java"
275 "cedet/tests/test.cpp"
276 "cedet/tests/test.py"
277 "cedet/tests/teststruct.cpp"
278 "*.el"
279 ;; Autogen:
280 "cus-load.el" "finder-inf.el" "ldefs-boot.el"
281 "compile" "config.guess" "config.sub" "depcomp"
282 ;; Only existed briefly, then renamed:
283 "images/icons/allout-widgets-dark-bg"
284 "images/icons/allout-widgets-light-bg"
285 ;; Never had any meaningful changes logged, now deleted:
286 "unidata/bidimirror.awk" "unidata/biditype.awk"
287 "split-man" "Xkeymap.txt" "ms-7bkermit" "ulimit.hack"
288 "gnu-hp300" "refcard.bit" "ledit.l" "forms.README" "forms-d2.dat"
289 "CXTERM-DIC/PY.tit" "CXTERM-DIC/ZIRANMA.tit"
290 "CXTERM-DIC/CTLau.tit" "CXTERM-DIC/CTLauB.tit"
291 "NICKLES.WORTH" "INTERVAL.IDEAS" "RCP"
292 "3B-MAXMEM" "AIX.DUMP" "SUN-SUPPORT" "XENIX"
293 "CODINGS" "CHARSETS"
294 "calc/INSTALL" "calc/Makefile"
295 "vms-pp.trans" "_emacs" "batcomp.com" "notes/cpp" ; admin/
296 "emacsver.texi.in"
297 ;; MH-E stuff not in Emacs:
298 "import-emacs" "release-utils"
299 ;; Erc stuff not in Emacs:
300 "ChangeLog.2001" "ChangeLog.2002" "ChangeLog.2003" "ChangeLog.2004"
301 "ChangeLog.2005"
302 "README.extras" "dir-template" "mkChangeLog" "MkChangeLog" "erc-auto.in"
303 "CREDITS" "HACKING"
304 "debian/changelog"
305 "debian/control"
306 "debian/copyright"
307 "debian/maint/conffiles"
308 "debian/maint/conffiles.in"
309 "debian/maint/postinst"
310 "debian/maint/postinst.in"
311 "debian/maint/prerm"
312 "debian/maint/prerm.in"
313 "debian/README.Debian"
314 "debian/README.erc-speak"
315 "debian/rules"
316 "debian/scripts/install"
317 "debian/scripts/install.in"
318 "debian/scripts/remove"
319 "debian/scripts/remove.in"
320 "debian/scripts/startup"
321 "debian/scripts/startup.erc"
322 "debian/scripts/startup.erc-speak"
323 )
324 "List of files and directories to ignore.
325 Changes to files in this list are not listed.")
326
327 ;; List via: find . -name '*.el' | sed 's/.*\///g' | sort | uniq -d
328 ;; FIXME It would be better to discover these dynamically.
329 ;; Note that traditionally "Makefile.in" etc have not been in this list.
330 ;; Ditto for "abbrev.texi" etc.
331 (defconst authors-ambiguous-files
332 '("chart.el"
333 "compile.el"
334 "complete.el"
335 "cpp.el"
336 "ctxt.el"
337 "custom.el"
338 "cyrillic.el"
339 "czech.el"
340 "debug.el"
341 "dired.el"
342 "el.el"
343 "eshell.el"
344 "ethiopic.el"
345 "f90.el"
346 "files.el"
347 "find.el"
348 "format.el"
349 "generic.el"
350 "georgian.el"
351 "greek.el"
352 "grep.el"
353 "hebrew.el"
354 "imenu.el"
355 "indian.el"
356 "japanese.el"
357 "java.el"
358 "lao.el"
359 "linux.el"
360 "locate.el"
361 "make.el"
362 "mode.el"
363 "python.el"
364 "rmailmm.el"
365 "semantic.el"
366 "shell.el"
367 "simple.el"
368 "slovak.el"
369 "sort.el"
370 "speedbar.el"
371 "srecode.el"
372 "table.el"
373 "texi.el"
374 "thai.el"
375 "tibetan.el"
376 "util.el"
377 "vc-bzr.el"
378 "wisent.el")
379 "List of basenames occurring more than once in the source.")
380
381 ;; FIXME :cowrote entries here can be overwritten by :wrote entries
382 ;; derived from a file's Author: header (eg mh-e). This really means
383 ;; the Author: header is erroneous.
384 (defconst authors-fixed-entries
385 '(("Richard M. Stallman" :wrote "[The original GNU Emacs and numerous files]")
386 ("Joseph Arceneaux" :wrote "xrdb.c")
387 ;; This refers to the obsolete Willisson (qv) version.
388 ;;; ("Blitz Product Development Corporation" :wrote "ispell.el")
389 ("Frank Bresz" :wrote "diff.el")
390 ("David M. Brown" :wrote "array.el")
391 ;; No longer distributed.
392 ;;; ("Gary Byers" :changed "xenix.h")
393 ("Shawn M. Carey" :wrote "freebsd.h")
394 ;; hp800.h renamed from hp9000s800.h, hpux.h merged into hpux10-20.h.
395 ;; FIXME overwritten by Author:.
396 ("Satyaki Das" :cowrote "mh-search.el")
397 ("Eric Decker" :changed "hp800.h" "hpux10-20.h" "sysdep.c")
398 ("Lawrence R. Dodd" :cowrote "dired-x.el")
399 ;; No longer distributed.
400 ;;; ("Viktor Dukhovni" :wrote "unexsunos4.c")
401 ("Paul Eggert" :wrote "rcs2log" "vcdiff")
402 ("Fred Fish" :changed "unexcoff.c")
403 ;; No longer distributed.
404 ;;; ("Tim Fleehart" :wrote "makefile.nt")
405 ("Keith Gabryelski" :wrote "hexl.c")
406 ("Kevin Gallagher" :wrote "flow-ctrl.el")
407 ;; Also wrote an earlier version of disp-table.el, since replaced
408 ;; by Erik Naggum's version; also iso-syntax.el, later renamed to
409 ;; latin-1.el, since deleted.
410 ("Howard Gayle" :wrote "casetab.c")
411 ;; :wrote mh-pick.el, since merged into mh-search.el.
412 ;; Originally wrote mh-funcs.el, but it has been rewritten since.
413 ("Stephen Gildea" :wrote "refcard.tex"
414 :cowrote "mh-funcs.el" "mh-search.el")
415 ;; cl.texinfo renamed to cl.texi.
416 ("David Gillespie" :wrote "cl.texi")
417 ;; No longer distributed: emacsserver.c.
418 ("Hewlett-Packard" :changed "emacsclient.c" "server.el" "keyboard.c")
419 ;; No longer distributed.
420 ;;; ("Thomas Horsley" :wrote "cxux.h" "cxux7.h")
421 ("Indiana University Foundation" :changed "buffer.c" "buffer.h"
422 "indent.c" "search.c" "xdisp.c" "region-cache.c" "region-cache.h")
423 ;; ibmrt.h, ibmrt-aix.h no longer distributed.
424 ("International Business Machines" :changed "emacs.c" "fileio.c"
425 "process.c" "sysdep.c" "unexcoff.c")
426 ;; No longer distributed.
427 ;;; ("Ishikawa Chiaki" :changed "aviion.h" "dgux.h")
428 ;; ymakefile no longer distributed.
429 ("Michael K. Johnson" :changed "configure.in" "emacs.c" "intel386.h"
430 "mem-limits.h" "process.c" "template.h" "sysdep.c" "syssignal.h"
431 "systty.h" "unexcoff.c" "linux.h")
432 ;; No longer distributed.
433 ;;; ("Kyle Jones" :wrote "mldrag.el")
434 ("Henry Kautz" :wrote "bib-mode.el")
435 ;; No longer distributed: vms-pwd.h, vmsfns.c, uaf.h.
436 ("Joseph M. Kelsey" :changed "fileio.c" "dir.h")
437 ("Sam Kendall" :changed "etags.c" "etags.el")
438 ;; ack.texi: "We're not using his backquote.el any more."
439 ("Richard King" :wrote "userlock.el" "filelock.c")
440 ("Sebastian Kremer" :changed "add-log.el")
441 ("Mark Lambert" :changed "process.c" "process.h")
442 ("Aaron Larson" :changed "bibtex.el")
443 ;; It was :wrote, but it has been rewritten since.
444 ("James R. Larus" :cowrote "mh-e.el")
445 ("Lars Lindberg" :changed "dabbrev.el" :cowrote "imenu.el")
446 ;; No longer distributed: lselect.el.
447 ("Lucid, Inc." :changed "bytecode.c" "byte-opt.el" "byte-run.el"
448 "bytecomp.el" "delsel.el" "disass.el" "faces.el" "font-lock.el"
449 "lmenu.el" "mailabbrev.el" "select.el" "xfaces.c" "xselect.c")
450 ;; MCC. No longer distributed: emacsserver.c.
451 ("Microelectronics and Computer Technology Corporation"
452 :changed "etags.c" "emacsclient.c" "movemail.c"
453 "rmail.el" "rmailedit.el" "rmailkwd.el"
454 "rmailmsc.el" "rmailout.el" "rmailsum.el" "scribe.el"
455 ;; It was :wrote for xmenu.c, but it has been rewritten since.
456 "server.el" "lisp.h" "sysdep.c" "unexcoff.c" "xmenu.c")
457 ("Niall Mansfield" :changed "etags.c")
458 ("Brian Marick" :cowrote "hideif.el")
459 ("Marko Kohtala" :changed "info.el")
460 ("Sidney Markowitz" :changed "doctor.el")
461 ;; No longer distributed: env.c.
462 ("Richard Mlynarik" :wrote "ehelp.el")
463 ("Mosur Mohan" :changed "etags.c")
464 ("Jeff Morgenthaler" :changed "flow-ctrl.el" "vt200.el" "vt201.el"
465 "vt220.el" "vt240.el")
466 ("Motorola" :changed "buff-menu.el")
467 ("Hiroshi Nakano" :changed "ralloc.c")
468 ;; File removed in Emacs 24.1.
469 ;;; ("Sundar Narasimhan" :changed "rnewspost.el")
470 ;; No longer distributed.
471 ;;; ("NeXT, Inc." :wrote "unexnext.c")
472 ("Mark Neale" :changed "fortran.el")
473 ;; Renamed from sc.el.
474 ("Martin Neitzel" :changed "supercite.el")
475 ("Andrew Oram" :changed "calendar.texi (and other files in man/)")
476 ("Frederic Pierresteguy" :wrote "widget.c")
477 ("Michael D. Prange" :changed "tex-mode.el")
478 ;; No longer distributed (dgux5-4r3.h was renamed to dgux5-4-3.h).
479 ;;; ("Paul Reilly" :wrote "gux5-4r2.h" "dgux5-4-3.h")
480 ("Roland B. Roberts" :changed "files.el" "sort.el"
481 "buffer.h" "callproc.c" "dired.c" "process.c" "sysdep.c" "systty.h")
482 ;; No longer distributed.
483 ;;; "vmspaths.h" "build.com" "compile.com" "kepteditor.com" "precomp.com"
484 ;;; "vmsproc.el" :wrote "logout.com" "mailemacs.com")
485 ;;; ("Guillermo J. Rozas" :wrote "fakemail.c")
486 ("Wolfgang Rupprecht" :changed "lisp-mode.el" "loadup.el"
487 "sort.el" "alloc.c" "callint.c"
488 ;; config.in renamed from config.h.in; ecrt0.c from crt0.c.
489 "config.in" "ecrt0.c" "data.c" "fns.c"
490 "lisp.h" "lread.c" ; "sun3.h" "ymakefile" - no longer distributed
491 "print.c" :wrote "float-sup.el" "floatfns.c")
492 ("Schlumberger Technology Corporation" :changed "gud.el")
493 ;; Replaced by tcl.el.
494 ;;; ("Gregor Schmid" :wrote "tcl-mode.el")
495 ("Rainer Schoepf" :wrote "alpha.h" "unexalpha.c")
496 ;; No longer distributed: emacsserver.c.
497 ("William Sommerfeld" :wrote "emacsclient.c" "scribe.el")
498 ;; No longer distributed: emacsserver.c.
499 ("Leigh Stoller" :changed "emacsclient.c" "server.el")
500 ("Steve Strassmann" :wrote "spook.el")
501 ("Shinichirou Sugou" :changed "etags.c")
502 ;; No longer distributed: emacsserver.c.
503 ("Sun Microsystems, Inc" :changed "emacsclient.c" "server.el"
504 :wrote "emacs.icon" "sun.el")
505 ;; No longer distributed.
506 ;;; "emacstool.1" "emacstool.c" "sun-curs.el"
507 ;;; "sun-fns.el" "sun-mouse.el" "sunfns.c")
508 ;; Renamed from sc.el.
509 ("Kayvan Sylvan" :changed "supercite.el")
510 ;; No longer distributed: emacsserver.c, tcp.c.
511 ("Spencer Thomas" :changed "emacsclient.c" "server.el"
512 "dabbrev.el" "unexcoff.c" "gnus.texi")
513 ("Jonathan Vail" :changed "vc.el")
514 ("James Van Artsdalen" :changed "usg5-4.h" "unexcoff.c")
515 ;; No longer distributed: src/makefile.nt, lisp/makefile.nt
516 ;; winnt.el renamed to w32-fns.el; nt.[ch] to w32.[ch];
517 ;; ntheap.[ch] to w32heap.[ch]; ntinevt.c to w32inevt.c;
518 ;; ntproc.c to w32proc.c; ntterm.c to w32term.c;
519 ;; windowsnt.h to ms-w32.h.
520 ("Geoff Voelker" :wrote "w32-fns.el" "w32.c" "w32.h" "w32heap.c"
521 "w32heap.h" "w32inevt.c" "w32proc.c" "w32term.c" "ms-w32.h")
522 ("Morten Welinder" :wrote "dosfns.c" "[many MS-DOS files]" "msdos.h")
523 ("Eli Zaretskii" :wrote "bidi.c" "[bidirectional display in xdisp.c]")
524 ;; Not using this version any more.
525 ;;; ("Pace Willisson" :wrote "ispell.el")
526 ;; FIXME overwritten by Author:.
527 ("Bill Wohler" :cowrote "mh-e.el")
528 ("Garrett Wollman" :changed "sendmail.el")
529 ("Dale R. Worley" :changed "mail-extr.el")
530 ("Jamie Zawinski" :changed "bytecode.c" :wrote "tar-mode.el"
531 :cowrote "disass.el"))
532 "Actions taken from the original, manually (un)maintained AUTHORS file.")
533
534
535 (defconst authors-valid-file-names
536 '("aclocal.m4"
537 "build-ins.in"
538 "Makefile.noleim"
539 "makedist.bat"
540 "makefile.def"
541 "makefile.nt"
542 "debug.bat.in" "emacs.bat.in"
543 ".gdbinit-union"
544 "alloca.s"
545 "make-delta"
546 "config.w95"
547 "emacstool.1"
548 "align.umax"
549 "cxux-crt0.s"
550 "gould-sigvec.s"
551 "getdate.y"
552 "ymakefile"
553 "permute-index" "index.perm"
554 "ibmrs6000.inp"
555 "b2m.c" "b2m.1" "b2m.pl"
556 "emacs.bash" "emacs.csh" "ms-kermit"
557 "emacs.ico"
558 "emacs21.ico"
559 "BABYL" "LPF" "LEDIT" "OTHER.EMACSES"
560 "emacs16_mac.png" "emacs24_mac.png"
561 "emacs256_mac.png" "emacs32_mac.png"
562 "emacs48_mac.png" "emacs512_mac.png"
563 "revdiff" ; admin/
564 "mainmake" "sed1.inp" "sed2.inp" "sed3.inp" ; msdos/
565 "mac-fix-env.m"
566 ;; Deleted vms stuff:
567 "temacs.opt" "descrip.mms" "compile.com" "link.com"
568 )
569 "File names which are valid, but no longer exist (or cannot be found)
570 in the repository.")
571
572 (defconst authors-renamed-files-alist
573 '(("nt.c" . "w32.c") ("nt.h" . "w32.h")
574 ("ntheap.c" . "w32heap.c") ("ntheap.h" . "w32heap.h")
575 ("ntinevt.c" . "w32inevt.c") ("ntinevt.h" . "w32inevt.h")
576 ("ntproc.c" . "w32proc.c")
577 ("w32console.c" . "w32term.c")
578 ("unexnt.c" . "unexw32.c")
579 ("s/windowsnt.h" . "s/ms-w32.h")
580 ("winnt.el" . "w32-fns.el")
581 ("config.emacs" . "configure")
582 ("config.h.dist" . "config.in")
583 ("config.h-dist" . "config.in")
584 ("config.h.in" . "config.in")
585 ("paths.h-dist" . "paths.h.in")
586 ("patch1" . "sed1.inp")
587 ("GETTING.GNU.SOFTWARE" . "FTP")
588 ("etc/MACHINES" . "MACHINES")
589 ("ONEWS" . "NEWS.19")
590 ("ONEWS.1" . "NEWS.1-17")
591 ("ONEWS.2" . "NEWS.1-17")
592 ("ONEWS.3" . "NEWS.18")
593 ("ONEWS.4" . "NEWS.18")
594 ("ORDERS.USA" . "ORDERS")
595 ("EUROPE" . "ORDERS")
596 ("DIFF" . "OTHER.EMACSES")
597 ("CCADIFF" . "OTHER.EMACSES")
598 ("GOSDIFF" . "OTHER.EMACSES")
599 ("Makefile.in.in" . "Makefile.in")
600 ("leim-Makefile" . "leim/Makefile")
601 ("leim-Makefile.in" . "leim/Makefile.in")
602 ("emacs-lisp/testcover-ses.el" . "tcover-ses.el")
603 ("emacs-lisp/testcover-unsafep.el" . "tcover-unsafep.el")
604 ;; index and pick merged into search.
605 ("mh-index.el" . "mh-search.el")
606 ("mh-pick.el" . "mh-search.el")
607 ("font-setting.el" . "dynamic-setting.el")
608 ;; INSTALL-CVS -> .CVS -> .BZR
609 ("INSTALL-CVS" . "INSTALL.BZR")
610 ("INSTALL.CVS" . "INSTALL.BZR")
611 ("refcards/fr-drdref.pdf" . "refcards/fr-dired-ref.pdf")
612 ("gnus-logo.eps" . "refcards/gnus-logo.eps")
613 ("build-install" . "build-ins.in")
614 ("build-install.in" . "build-ins.in")
615 ("unidata/Makefile" . "unidata/Makefile.in")
616 ;; Not renamed, but we only have the latter in the Emacs repo.
617 ("trampver.texi.in" . "trampver.texi")
618 ("e/eterm" . "e/eterm-color")
619 ("e/eterm.ti" . "e/eterm-color.ti")
620 ("README.txt" . "README")
621 ("emacs.names" . "JOKES")
622 ("ED.WORSHIP" . "JOKES")
623 ("GNU.JOKES" . "JOKES")
624 ("CHARACTERS" . "TODO")
625 ("schema/xhtml-basic-form.rnc" . "schema/xhtml-bform.rnc" )
626 ("schema/xhtml-basic-table.rnc" . "schema/xhtml-btable.rnc")
627 ("schema/xhtml-list.rnc" . "schema/xhtml-lst.rnc")
628 ("schema/xhtml-target.rnc" . "schema/xhtml-tgt.rnc")
629 ("schema/xhtml-style.rnc" . "schema/xhtml-xstyle.rnc")
630 ("schema/docbook-dyntbl.rnc" . "schema/docbk-dyntbl.rnc")
631 ("schema/docbook-soextbl.rnc" . "schema/docbk-soextbl.rn" )
632 ("texi/url.txi" . "url.texi")
633 ("edt-user.doc" . "edt.texi")
634 ("DEV-NOTES" . "nextstep")
635 ("org/COPYRIGHT-AND-LICENSE" . "org/README")
636 ;; Moved to different directories.
637 ("ctags.1" . "ctags.1")
638 ("etags.1" . "etags.1")
639 ("emacs.1" . "emacs.1")
640 ("emacsclient.1" . "emacsclient.1")
641 ("icons/emacs21.ico" . "emacs21.ico")
642 ;; Moved from admin/nt/ to nt/.
643 ("nt/README.W32" . "README.W32")
644 )
645 "Alist of files which have been renamed during their lifetime.
646 Elements are (OLDNAME . NEWNAME).")
647
648 (defconst authors-renamed-files-regexps
649 '(("^m/m-\\(.*\\.h\\)$" . "m/\\1")
650 ("^m-\\(.*\\.h\\)$" . "\\1")
651 ("^s/s-\\(.*\\.h\\)$" . "s/\\1")
652 ("^s-\\(.*\\.h\\)$" . "\\1")
653 ("^s/[-.a-zA-Z0-9_]+\\.h$" . t)
654 ("\\(.*\\)\\.cmd$" . "\\1.bat")
655 ("\\.bat$" . t)
656 ("\\.[ch]$" . t)
657 ("\\.el$" . t)
658 ("\\.ps$" . t)
659 ("\\.texi?$" . t)
660 ("\\.texinfo$" . t)
661 ("\\.xml?$" . t)
662 ("\\.x[pb]m$" . t)
663 ("\\.[xp]bm$" . t)
664 ("^paths\\." . t)
665 ("^install\\." . t)
666 ("^\\(TUTORIAL[^/]*\\)" . "tutorials/\\1")
667 ("^\\(tree-widget/\\(?:default\\|folder\\)/[-a-z]+\\.png\\)$" .
668 "images/\\1")
669 ("^\\(images/icons/\\)mac\\(emacs\\)_\\([0-9]+\\)\\(\\.png\\)" .
670 "\\1\\2\\3_mac\\4")
671 ("\\(images/icons/\\)emacs_\\([0-9][0-9]\\)\\.png" .
672 "\\1hicolor/\\2x\\2/apps/emacs.png")
673 )
674 "List regexps and rewriting rules for renamed files.
675 Elements are (REGEXP . REPLACE). If REPLACE is a string, the file
676 name matching REGEXP is replaced by REPLACE using `replace-string'.
677 Otherwise, the file name is accepted as is.")
678
679 (defvar authors-checked-files-alist)
680 (defvar authors-invalid-file-names)
681
682 (defun authors-disambiguate-file-name (fullname)
683 "Convert FULLNAME to an unambiguous relative-name."
684 (let ((relname (file-name-nondirectory fullname))
685 parent)
686 (if (member relname authors-ambiguous-files)
687 ;; In case of ambiguity, just prepend the parent directory.
688 ;; FIXME obviously this is not a perfect solution.
689 (if (string-equal "lisp"
690 (setq parent (file-name-nondirectory
691 (directory-file-name
692 (file-name-directory fullname)))))
693 relname
694 (format "%s/%s" parent relname))
695 relname)))
696
697 (defun authors-canonical-file-name (file log-file pos author)
698 "Return canonical file name for FILE found in LOG-FILE.
699 Checks whether FILE is a valid (existing) file name, has been renamed,
700 or is on the list of removed files. Returns the non-directory part of
701 the file name. Only uses the LOG-FILE position POS and associated AUTHOR
702 to print a message if FILE is not found."
703 ;; FILE should be re-checked in every different directory associated
704 ;; with a LOG-FILE. Eg configure.in from src/ChangeLog is not the
705 ;; same as that from top-level/ChangeLog.
706 (let* ((fullname (expand-file-name file (file-name-directory log-file)))
707 (entry (assoc fullname authors-checked-files-alist))
708 relname
709 valid)
710 (if entry
711 (cdr entry)
712 (setq relname (file-name-nondirectory file))
713 (if (or (member relname authors-valid-file-names)
714 (file-exists-p file)
715 (file-exists-p relname)
716 (file-exists-p (concat "etc/" relname)))
717 (setq valid (authors-disambiguate-file-name fullname))
718 (setq valid (assoc file authors-renamed-files-alist))
719 (if valid
720 (setq valid (cdr valid))
721 (let ((rules authors-renamed-files-regexps))
722 (while rules
723 (if (string-match (car (car rules)) file)
724 (setq valid (if (stringp (cdr (car rules)))
725 (file-name-nondirectory
726 (replace-match (cdr (car rules)) t nil file))
727 relname)
728 rules nil))
729 (setq rules (cdr rules))))))
730 (setq authors-checked-files-alist
731 (cons (cons fullname valid) authors-checked-files-alist))
732 (unless (or valid
733 (member file authors-ignored-files)
734 (authors-obsolete-file-p file)
735 (string-match "[*]" file)
736 (string-match "^[0-9.]+$" file))
737 (setq authors-invalid-file-names
738 (cons (format "%s:%d: unrecognized `%s' for %s"
739 log-file
740 (1+ (count-lines (point-min) pos))
741 file author)
742 authors-invalid-file-names)))
743 valid)))
744
745 (defun authors-add-fixed-entries (table)
746 "Add actions from `authors-fixed-entries' to TABLE."
747 (dolist (entry authors-fixed-entries)
748 (let ((author (car entry))
749 action)
750 (dolist (item (cdr entry))
751 (if (symbolp item)
752 (setq action item)
753 (authors-add author item action table))))))
754
755
756 (defun authors-obsolete-file-p (file)
757 "Return non-nil if FILE is obsolete.
758 FILE is considered obsolete if it matches one of the regular expressions
759 from `authors-obsolete-files-regexps'."
760 (let (obsolete-p
761 (regexps authors-obsolete-files-regexps))
762 (while (and regexps (not obsolete-p))
763 (setq obsolete-p (string-match (car regexps) file)
764 regexps (cdr regexps)))
765 obsolete-p))
766
767
768 (defun authors-add (author file action table)
769 "Record that AUTHOR worked on FILE.
770 ACTION is a keyword symbol describing what he did. Record file,
771 author and what he did in hash table TABLE. See the description of
772 `authors-scan-change-log' for the structure of the hash table."
773 (unless (or (member file authors-ignored-files)
774 (authors-obsolete-file-p file)
775 (equal author ""))
776 (let* ((value (gethash author table))
777 (entry (assoc file value))
778 slot)
779 (if (null entry)
780 (puthash author (cons (list file (cons action 1)) value) table)
781 (if (setq slot (assoc action (cdr entry)))
782 (setcdr slot (1+ (cdr slot)))
783 (nconc entry (list (cons action 1))))))))
784
785
786 (defun authors-canonical-author-name (author)
787 "Return a canonicalized form of AUTHOR, an author name.
788 If AUTHOR has an entry in `authors-aliases', use that. Remove
789 email addresses. Capitalize words in the author's name, unless
790 it is found in `authors-fixed-case'."
791 (let* ((aliases authors-aliases)
792 regexps realname)
793 (while aliases
794 (setq realname (car (car aliases))
795 regexps (cdr (car aliases))
796 aliases (cdr aliases))
797 (while regexps
798 (if (string-match (car regexps) author)
799 (setq author realname
800 regexps nil
801 aliases nil)
802 (setq regexps (cdr regexps))))))
803 (when 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 (setq author (replace-regexp-in-string "[ \t]+" " " author))
808 (unless (string-match "[-, \t]" author)
809 (setq author ""))
810 (or (car (member author authors-fixed-case))
811 (capitalize author))))
812
813 (defun authors-scan-change-log (log-file table)
814 "Scan change log LOG-FILE for author information.
815
816 For each change mentioned in the log, add an entry to hash table TABLE
817 under the author's canonical name.
818
819 Keys of TABLE are author names. Values are alists of entries (FILE
820 \(ACTION . COUNT) ...). FILE is one file the author worked on. The
821 rest of the entry is a list of keyword symbols describing what he did
822 with the file and the number of each action:
823
824 :wrote means the author wrote the file
825 :cowrote means he wrote the file in collaboration with others
826 :changed means he changed the file COUNT times."
827
828 (let* ((enable-local-variables :safe) ; for find-file, hence let*
829 (enable-local-eval nil)
830 (existing-buffer (get-file-buffer log-file))
831 (buffer (find-file-noselect log-file))
832 authors pos)
833 (with-current-buffer buffer
834 (save-restriction
835 (widen)
836 (goto-char (point-min))
837 (while (re-search-forward "^[0-9]\\|^[ \t]+\\* " nil t)
838 (beginning-of-line)
839 (setq pos (point))
840 (cond ((looking-at "^[0-9]+-[0-9]+-[0-9]+")
841 ;; Handle joint authorship of changes.
842 ;; This can be a bit fragile, and is not too common.
843 (setq authors nil)
844 (while (progn
845 (skip-chars-forward " \t+:0-9-")
846 (not (looking-at "\\($\\|\\*\\|\
847 Suggested\\|Trivial\\|Version\\|Originally\\|From:\\|Patch[ \t]+[Bb]y\\)")))
848 (push (authors-canonical-author-name
849 (buffer-substring-no-properties
850 (point) (line-end-position))) authors)
851 (forward-line 1)))
852 ((looking-at "^[ \t]+\\*")
853 (let ((line (buffer-substring-no-properties
854 (match-end 0) (line-end-position))))
855 (while (and (not (string-match ":" line))
856 (forward-line 1)
857 (not (looking-at ":\\|^[ \t]*$")))
858 (setq line (concat line
859 (buffer-substring-no-properties
860 (line-beginning-position)
861 (line-end-position)))))
862 (when (string-match ":" line)
863 (setq line (substring line 0 (match-beginning 0)))
864 (setq line (replace-regexp-in-string "[[(<{].*$" "" line))
865 (setq line (replace-regexp-in-string "," "" line))
866 (dolist (file (split-string line))
867 (when (setq file (authors-canonical-file-name file log-file pos (car authors)))
868 (dolist (author authors)
869 ;;(message "%s changed %s" author file)
870 (authors-add author file :changed table)))))
871 (forward-line 1)))))))
872 (unless existing-buffer
873 (kill-buffer buffer))))
874
875
876 (defun authors-scan-el (file table)
877 "Scan Lisp file FILE for author information.
878 TABLE is a hash table to add author information to."
879 (let* ((existing-buffer (get-file-buffer file))
880 (enable-local-variables :safe) ; for find-file, hence let*
881 (enable-local-eval nil)
882 (buffer (find-file-noselect file)))
883 (setq file (authors-disambiguate-file-name (expand-file-name file)))
884 (with-current-buffer buffer
885 (save-restriction
886 (widen)
887 (goto-char (point-min))
888 (while (and (re-search-forward
889 "^;+[ \t]*\\(Authors?\\|Commentary\\|Code\\):[ \t]*" nil t)
890 (not (member (match-string 1) '("Commentary" "Code"))))
891 (let ((continue t)
892 (action :wrote)
893 authors)
894 (while continue
895 ;; Some entries contain a year range in front of the
896 ;; author's name.
897 (skip-chars-forward "-0-9 \t")
898 (push (authors-canonical-author-name
899 (buffer-substring-no-properties
900 (point) (line-end-position))) authors)
901 ;; tips.texi says the continuation line should begin
902 ;; with a tab, but often spaces are used.
903 (setq continue
904 (and (zerop (forward-line 1))
905 (looking-at ";;;?\\(\t+ *\\| +\\)[[:alnum:]]")
906 (goto-char (1- (match-end 0)))
907 (not (looking-at "[[:upper:]][-[:alpha:]]+:[ \t]")))))
908 (and (> (length authors) 1)
909 (setq action :cowrote))
910 (mapc (lambda (author)
911 (authors-add author file action table))
912 authors)))))
913 (unless existing-buffer
914 (kill-buffer buffer))))
915
916
917 (defun authors-public-domain-p (file)
918 "Return t if FILE is a file that was put in public domain."
919 (let ((public-domain-p nil)
920 (list authors-public-domain-files))
921 (while (and list (not public-domain-p))
922 (when (string-match (car list) file)
923 (setq public-domain-p t))
924 (setq list (cdr list)))
925 public-domain-p))
926
927 (defvar authors-author-list)
928
929 (defun authors-add-to-author-list (author changes)
930 "Insert information about AUTHOR's work on Emacs into `authors-author-list'.
931 CHANGES is an alist of entries (FILE (ACTION . COUNT) ...), as produced by
932 `authors-scan-change-log'.
933 The element added to `authors-author-list' is (AUTHOR WROTE CO-WROTE CHANGED),
934 where WROTE, CO-WROTE, and CHANGED are lists of the files written, co-written
935 and changed by AUTHOR."
936 (when author
937 (let ((nchanged 0)
938 wrote-list
939 cowrote-list
940 changed-list)
941 (dolist (change changes)
942 (let* ((actions (cdr change))
943 (file (car change))
944 (filestat (if (authors-public-domain-p file)
945 (concat file " (public domain)")
946 file)))
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