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