authors.el 40 KB

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