changeset 32028:1bb0e9c9c64d

(authors-obsolete-file-p): New function. (authors-obsolete-files-regexps): New variable. (authors-add): Don't record changes in obsolete files.
author Gerd Moellmann <gerd@gnu.org>
date Sat, 30 Sep 2000 12:06:16 +0000
parents 638a006b3c47
children aed9b8b49f47
files lisp/emacs-lisp/authors.el
diffstat 1 files changed, 28 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/authors.el	Fri Sep 29 22:24:38 2000 +0000
+++ b/lisp/emacs-lisp/authors.el	Sat Sep 30 12:06:16 2000 +0000
@@ -87,17 +87,39 @@
 ignore that author.")
 
 
+(defvar authors-obsolete-files-regexps
+  '("vc-\\*\\.el$"
+    "spec.txt$"
+    "vc-\\(rcs\\|cvs\\|sccs\\)-hooks\\.el$")
+  "List of regexps matching obsolete files.
+Changes to files matching one of the regexps in this list are not
+listed.")
+
+
+(defun authors-obsolete-file-p (file)
+  "Return non-nil if FILE is obsolete.
+FILE is considered obsolete if it matches on of the regular expressions
+from `authors-obsolete-files-regexps'."
+  (let (obsolete-p
+	(regexps authors-obsolete-files-regexps))
+    (while (and regexps (not obsolete-p))
+      (setq obsolete-p (string-match (car regexps) file)
+	    regexps (cdr regexps)))
+    obsolete-p))
+
+
 (defun authors-add (author file action table)
   "Record that AUTHOR worked on FILE.
 ACTION is a keyword symbol describing what he did.  Record file,
 author and what he did in hash table TABLE.  See the description of
 `authors-scan-change-log' for the structure of the hash table."
-  (let* ((value (gethash author table))
-	 (entry (assoc file value)))
-    (if (null entry)
-	(puthash author (cons (list file action) value) table)
-      (unless (memq action entry)
-	(nconc entry (list action))))))
+  (unless (authors-obsolete-file-p file)
+    (let* ((value (gethash author table))
+	   (entry (assoc file value)))
+      (if (null entry)
+	  (puthash author (cons (list file action) value) table)
+	(unless (memq action entry)
+	  (nconc entry (list action)))))))
 
 
 (defun authors-process-lines (program &rest args)