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