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