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