]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/authors.el
(authors-process-lines): Remove.
[gnu-emacs] / lisp / emacs-lisp / authors.el
index 31464269567ea123473e89c9bf322ed39c5fdbc4..486a02d2c6b11dbae9bcf837cdc7701946b2ea87 100644 (file)
@@ -11,7 +11,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -72,7 +72,7 @@ files.")
     ("Geoff Voelker" "voelker")
     ("Gerd M\e,Av\e(Bllmann" "Gerd Moellmann")
     ("Hallvard B. Furuseth" "Hallvard B Furuseth")
-    ("Hrvoje Nik\e,B9\e(Bi\e,Bf\e(B" "Hrvoje Niksic")
+    ("Hrvoje Nik\e$,1!!\e(Bi\e$,1 '\e(B" "Hrvoje Niksic")
     (nil "(afs@hplb.hpl.hp.com)")
     (nil "<Use-Author-Address-Header@\\[127.1\\]>")
     (nil "Code Extracted")
@@ -81,7 +81,7 @@ files.")
     ("Jaeyoun Chung" "Jae-youn Chung" "Jae-you Chung" "Chung Jae-youn")
     ("Jan Dj\e,Ad\e(Brv" "Jan D." "Jan Djarv")
     ("Jay K. Adams" "jka@ece.cmu.edu" "Jay Adams")
-    ("J\e,Ai\e(Br\e,At\e(Bme Marant" "J\e,bi\e(Br\e,bt\e(Bme Marant" "Jerome Marant")
+    ("J\e,Ai\e(Br\e,At\e(Bme Marant" "J\e,Ai\e(Br\e,At\e(Bme Marant" "Jerome Marant")
     ("Jens-Ulrik Holger Petersen" "Jens-Ulrik Petersen")
     ("Jeremy Bertram Maitin-Shepard" "Jeremy Maitin-Shepard")
     ("Johan Bockg\e,Ae\e(Brd" "Johan Bockgard")
@@ -90,11 +90,11 @@ files.")
     ("Joseph Arceneaux" "Joe Arceneaux")
     ("Juan Le\e,As\e(Bn Lahoz Garc\e,Am\e(Ba" "Juan-Leon Lahoz Garcia")
     ("K. Shane Hartman" "Shane Hartman")
-    ("Kai Gro\e,A_\e(Bjohann" "Kai Grossjohann" "Kai Gro\e,b_\e(Bjohann"
+    ("Kai Gro\e,A_\e(Bjohann" "Kai Grossjohann" "Kai Gro\e,A_\e(Bjohann"
      "Kai.Grossjohann@Cs.Uni-Dortmund.De"
      "Kai.Grossjohann@Gmx.Net")
     ("Karl Berry" "K. Berry")
-    ("K\e,Aa\e(Broly L\e$,1 q\e(Brentey" "K\e,Aa\e(Broly L\e,Bu\e(Brentey" "L\e$,1 q\e(Brentey K\e,Aa\e(Broly")
+    ("K\e,Aa\e(Broly L\e$,1 q\e(Brentey" "K\e,Aa\e(Broly L\e$,1 q\e(Brentey" "L\e$,1 q\e(Brentey K\e,Aa\e(Broly")
     ("Kazushi Marukawa" "Kazushi")
     ("Ken Manheimer" "Kenneth Manheimer")
     ("Kenichi Handa" "Ken'ichi Handa" "Kenichi HANDA")
@@ -113,7 +113,7 @@ files.")
     ("Mikio Nakajima" "Nakajima Mikio")
     ("Paul Eggert" "eggert")
     ("Paul Reilly" "(pmr@legacy.pajato.com)")
-    ("Pavel Jan\e,Bm\e(Bk" "Pavel Jan\e,Am\e(Bk Ml." "Pavel Jan\e,Am\e(Bk" "Pavel@Janik.Cz")
+    ("Pavel Jan\e,Am\e(Bk" "Pavel Jan\e,Am\e(Bk Ml." "Pavel Jan\e,Am\e(Bk" "Pavel@Janik.Cz")
     ("Per Abrahamsen" "Per Abhiddenware")
     ("Peter S. Galbraith" "Peter Galbraith")
     ("Peter Runestig" "Peter 'luna' Runestig")
@@ -418,24 +418,6 @@ author and what he did in hash table TABLE.  See the description of
          (nconc entry (list (cons action 1))))))))
 
 
-(defun authors-process-lines (program &rest args)
-  "Execute PROGRAM with ARGS, returning its output as a list of lines.
-Signal an error if the program returns with a non-zero exit status."
-  (with-temp-buffer
-    (let ((status (apply 'call-process program nil (current-buffer) nil args)))
-      (unless (eq status 0)
-       (error "%s exited with status %s" program status))
-      (goto-char (point-min))
-      (let (lines)
-       (while (not (eobp))
-         (setq lines (cons (buffer-substring-no-properties
-                            (line-beginning-position)
-                            (line-end-position))
-                           lines))
-         (forward-line 1))
-       (nreverse lines)))))
-
-
 (defun authors-canonical-author-name (author)
   "Return a canonicalized form of AUTHOR, an author name.
 If AUTHOR has an alias, use that.  Remove email addresses.  Capitalize
@@ -475,8 +457,8 @@ with the file and the number of each action.
 :wrote         means the author wrote the file
 :changed       means he changed the file COUNT times."
 
-  (let* ((enable-local-variables t)
-        (enable-local-eval t)
+  (let* ((enable-local-variables :safe)
+        (enable-local-eval nil)
         (existing-buffer (get-file-buffer log-file))
         (buffer (find-file-noselect log-file))
         author file pos)
@@ -521,8 +503,8 @@ with the file and the number of each action.
   "Scan Lisp file FILE for author information.
 TABLE is a hash table to add author information to."
   (let* ((existing-buffer (get-file-buffer file))
-        (enable-local-variables t)
-        (enable-local-eval t)
+        (enable-local-variables :safe)
+        (enable-local-eval nil)
         (buffer (find-file-noselect file)))
     (save-excursion
       (set-buffer buffer)
@@ -605,7 +587,7 @@ Result is a buffer *Authors* containing authorship information, and a
 buffer *Authors Errors* containing references to unknown files."
   (interactive "DEmacs source directory: ")
   (setq root (expand-file-name root))
-  (let ((logs (authors-process-lines "find" root "-name" "ChangeLog*"))
+  (let ((logs (process-lines "find" root "-name" "ChangeLog*"))
        (table (make-hash-table :test 'equal))
        (buffer-name "*Authors*")
        authors-checked-files-alist
@@ -617,7 +599,7 @@ buffer *Authors Errors* containing references to unknown files."
       (when (string-match "ChangeLog\\(.[0-9]+\\)?$" log)
        (message "Scanning %s..." log)
        (authors-scan-change-log log table)))
-    (let ((els (authors-process-lines "find" root "-name" "*.el")))
+    (let ((els (process-lines "find" root "-name" "*.el")))
       (dolist (file els)
        (message "Scanning %s..." file)
        (authors-scan-el file table)))
@@ -666,8 +648,8 @@ list of their contributions.\n")
          (erase-buffer)
          (set-buffer-file-coding-system authors-coding-system)
          (insert "Unrecognized file entries found:\n\n")
-         (mapcar (lambda (f) (if (not (string-match "^[A-Za-z]+$" f)) (insert f "\n")))
-                 (sort authors-invalid-file-names 'string-lessp))
+         (mapc (lambda (f) (if (not (string-match "^[A-Za-z]+$" f)) (insert f "\n")))
+               (sort authors-invalid-file-names 'string-lessp))
          (goto-char (point-min))
          (compilation-mode)
          (message "Errors were found.  See buffer %s" (buffer-name))))