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