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