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