diff options
| author | Gerd Moellmann | 2000-09-30 12:06:40 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-09-30 12:06:40 +0000 |
| commit | 8a5506f2971851273b4f46d1650018e95f85b544 (patch) | |
| tree | 739db1ed299628bc4c1f07f1145df3411633be49 | |
| parent | 9194723588027a987600afe7c2abc9d6f977e90e (diff) | |
| download | emacs-8a5506f2971851273b4f46d1650018e95f85b544.tar.gz emacs-8a5506f2971851273b4f46d1650018e95f85b544.zip | |
(authors-obsolete-file-p): New function.
(authors-obsolete-files-regexps): New variable.
(authors-add): Don't record changes in obsolete files.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/authors.el | 34 |
2 files changed, 34 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3d6280a7c49..c897e57567f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2000-09-30 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp/authors.el (authors-obsolete-file-p): New function. | ||
| 4 | (authors-obsolete-files-regexps): New variable. | ||
| 5 | (authors-add): Don't record changes in obsolete files. | ||
| 6 | |||
| 1 | 2000-09-29 Stefan Monnier <monnier@cs.yale.edu> | 7 | 2000-09-29 Stefan Monnier <monnier@cs.yale.edu> |
| 2 | 8 | ||
| 3 | * autoinsert.el (auto-insert-mode): Use define-minor-mode. | 9 | * autoinsert.el (auto-insert-mode): Use define-minor-mode. |
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 7ff37ca9de9..0f2c2d2db0d 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el | |||
| @@ -87,17 +87,39 @@ matches REGEXP, use ALIAS instead. The special alias \"ignore\" means | |||
| 87 | ignore that author.") | 87 | ignore that author.") |
| 88 | 88 | ||
| 89 | 89 | ||
| 90 | (defvar authors-obsolete-files-regexps | ||
| 91 | '("vc-\\*\\.el$" | ||
| 92 | "spec.txt$" | ||
| 93 | "vc-\\(rcs\\|cvs\\|sccs\\)-hooks\\.el$") | ||
| 94 | "List of regexps matching obsolete files. | ||
| 95 | Changes to files matching one of the regexps in this list are not | ||
| 96 | listed.") | ||
| 97 | |||
| 98 | |||
| 99 | (defun authors-obsolete-file-p (file) | ||
| 100 | "Return non-nil if FILE is obsolete. | ||
| 101 | FILE is considered obsolete if it matches on of the regular expressions | ||
| 102 | from `authors-obsolete-files-regexps'." | ||
| 103 | (let (obsolete-p | ||
| 104 | (regexps authors-obsolete-files-regexps)) | ||
| 105 | (while (and regexps (not obsolete-p)) | ||
| 106 | (setq obsolete-p (string-match (car regexps) file) | ||
| 107 | regexps (cdr regexps))) | ||
| 108 | obsolete-p)) | ||
| 109 | |||
| 110 | |||
| 90 | (defun authors-add (author file action table) | 111 | (defun authors-add (author file action table) |
| 91 | "Record that AUTHOR worked on FILE. | 112 | "Record that AUTHOR worked on FILE. |
| 92 | ACTION is a keyword symbol describing what he did. Record file, | 113 | ACTION is a keyword symbol describing what he did. Record file, |
| 93 | author and what he did in hash table TABLE. See the description of | 114 | author and what he did in hash table TABLE. See the description of |
| 94 | `authors-scan-change-log' for the structure of the hash table." | 115 | `authors-scan-change-log' for the structure of the hash table." |
| 95 | (let* ((value (gethash author table)) | 116 | (unless (authors-obsolete-file-p file) |
| 96 | (entry (assoc file value))) | 117 | (let* ((value (gethash author table)) |
| 97 | (if (null entry) | 118 | (entry (assoc file value))) |
| 98 | (puthash author (cons (list file action) value) table) | 119 | (if (null entry) |
| 99 | (unless (memq action entry) | 120 | (puthash author (cons (list file action) value) table) |
| 100 | (nconc entry (list action)))))) | 121 | (unless (memq action entry) |
| 122 | (nconc entry (list action))))))) | ||
| 101 | 123 | ||
| 102 | 124 | ||
| 103 | (defun authors-process-lines (program &rest args) | 125 | (defun authors-process-lines (program &rest args) |