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