1 ;;; authors.el --- utility for maintaining Emacs' AUTHORS file -*-coding: utf-8;-*-
3 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005,
4 ;; 2006, 2007, 2008 Free Software Foundation, Inc.
6 ;; Author: Gerd Moellmann <gerd@gnu.org>
7 ;; Maintainer: Kim F. Storm <storm@cua.dk>
10 ;; This file is part of GNU Emacs.
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.
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.
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/>.
27 ;; Use M-x authors RET to create an *Authors* buffer that can used as
28 ;; or merged with Emacs' AUTHORS file.
32 (defvar authors-coding-system
'utf-8
33 "Coding system used in the AUTHORS file.")
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
41 (defconst authors-aliases
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"
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"
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")
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"
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")
141 "Alist of author aliases.
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.")
147 (defconst authors-fixed-case
149 "Christian von Roques"
154 "Dominique de Waleffe"
156 "Exal de Jesus Garcia Carrillo"
166 "List of authors whose names cannot be simply capitalized.")
168 (defvar authors-public-domain-files
183 "List of regexps matching files for which the FSF doesn't need papers.")
186 (defvar authors-obsolete-files-regexps
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
194 (defconst authors-ignored-files
196 "lock" "share-lib" "local-lisp"
198 "NEWS" "ORDERS" "PROBLEMS" "FAQ" "AUTHORS" "FOR-RELEASE" "TODO" "todo"
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"
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"
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"
226 "README.extras" "dir-template" "mkChangeLog" "MkChangeLog" "erc-auto.in"
231 "debian/maint/conffiles"
232 "debian/maint/conffiles.in"
233 "debian/maint/postinst"
234 "debian/maint/postinst.in"
236 "debian/maint/prerm.in"
237 "debian/README.Debian"
238 "debian/README.erc-speak"
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"
248 "List of files and directories to ignore.
249 Changes to files in this list are not listed.")
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"
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"
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/"
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.")
356 (defconst authors-valid-file-names
363 "debug.bat.in" "emacs.bat.in"
374 "permute-index" "index.perm"
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"
383 "File names which are valid, but no longer exist (or cannot be
384 found) in the repository.")
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")
446 "Alist of files which have been renamed during their lifetime.
447 Elements are (OLDNAME . NEWNAME).")
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")
467 ("^\\(TUTORIAL[^/]*\\)" .
"tutorials/\\1")
468 ("^\\(tree-widget/\\(?:default\\|folder\\)/[-a-z]+\\.png\\)$" .
470 ("^\\(images/icons/\\)mac\\(emacs\\)_\\([0-9]+\\)\\(\\.png\\)" .
472 ("\\(images/icons/\\)emacs_\\([0-9][0-9]\\)\\.png" .
473 "\\1hicolor/\\2x\\2/apps/emacs.png")
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.")
480 (defvar authors-checked-files-alist
)
481 (defvar authors-invalid-file-names
)
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
488 (let ((entry (assoc file authors-checked-files-alist
))
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.
499 (setq relname
(file-name-nondirectory file
))
500 (if (or (member relname authors-valid-file-names
)
502 (file-exists-p relname
)
503 (file-exists-p (concat "etc/" relname
)))
505 (setq valid
(assoc file authors-renamed-files-alist
))
507 (setq valid
(cdr valid
))
508 (let ((rules authors-renamed-files-regexps
))
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
))
516 (setq rules
(cdr rules
))))))
517 (setq authors-checked-files-alist
518 (cons (cons file valid
) authors-checked-files-alist
))
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"
526 (1+ (count-lines (point-min) pos
))
528 authors-invalid-file-names
)))
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
))
536 (dolist (item (cdr entry
))
539 (authors-add author item action table
))))))
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'."
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
)))
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
)
562 (let* ((value (gethash author table
))
563 (entry (assoc file value
))
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))))))))
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
)
580 (setq realname
(car (car aliases
))
581 regexps
(cdr (car aliases
))
582 aliases
(cdr aliases
))
584 (if (string-match (car regexps
) author
)
585 (setq author realname
588 (setq regexps
(cdr regexps
))))))
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
)
596 (or (car (member author authors-fixed-case
))
597 (capitalize author
))))
599 (defun authors-scan-change-log (log-file table
)
600 "Scan change log LOG-FILE for author information.
602 For each change mentioned in the log, add an entry to hash table TABLE
603 under the author's canonical name.
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.
610 :wrote means the author wrote the file
611 :changed means he changed the file COUNT times."
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
))
622 (goto-char (point-min))
623 (while (re-search-forward "^[0-9]\\|^[ \t]+\\* " nil t
)
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
))
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
))
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
))))
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
)))
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
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
))))
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
)))
693 (defvar authors-author-list
)
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."
705 (dolist (change changes
)
706 (let ((actions (cdr change
))
709 (if (assq :wrote actions
)
712 (if (authors-public-domain-p file
)
713 (concat file
" (public domain)")
717 (cons (cons file
(cdr (assq :changed actions
)))
720 (setq wrote-list
(sort wrote-list
'string-lessp
)))
722 (setq changed-list
(sort changed-list
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
)))))
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
))
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")))
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
))
763 (set-buffer-file-coding-system authors-coding-system
)
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
))
779 (insert "\n" author
": ")
783 (if (> (+ (current-column) (length file
)) 72)
791 (dolist (file changed
)
792 (if (> (+ (current-column) (length file
)) 72)
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
)
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))
810 (message "Errors were found. See buffer %s" (buffer-name))))
811 (pop-to-buffer buffer-name
))))
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
)))
830 ;; arch-tag: 659d5900-5ff2-43b0-954c-a315cc1e4dc1
831 ;;; authors.el ends here