diff options
| author | Glenn Morris | 2010-04-23 19:16:13 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-04-23 19:16:13 -0700 |
| commit | fea1add44802d318b71d0aa2f35740f1d8640d26 (patch) | |
| tree | 2351373f60c084b1f7eb2bac5d49de9ca757f5ae | |
| parent | e769f484f52186e0b6bd19484e8e9c829a0bafd4 (diff) | |
| download | emacs-fea1add44802d318b71d0aa2f35740f1d8640d26.tar.gz emacs-fea1add44802d318b71d0aa2f35740f1d8640d26.zip | |
Minor authors.el updates.
* emacs-lisp/authors.el (authors-obsolete-files-regexps):
Ignore VCS-ignore files, and deleted nextstep preferences files.
(authors-ignored-files): Ignore deleted cedet test files, and "*.el".
(authors-ambiguous-files): New list.
(authors-valid-file-names): Add some deleted files.
(authors-renamed-files-alist): Add font-setting.el, edt-user.doc.
(authors-disambiguate-file-name): New function. (Bug#5501)
(authors-canonical-file-name): Doc fix.
Don't warn about obsolete files.
(authors-canonical-file-name, authors-scan-el):
Use authors-disambiguate-file-name.
| -rw-r--r-- | lisp/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/emacs-lisp/authors.el | 78 |
2 files changed, 87 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 834f8486ea6..feb33ec4807 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2010-04-24 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp/authors.el (authors-obsolete-files-regexps): | ||
| 4 | Ignore VCS-ignore files, and deleted nextstep preferences files. | ||
| 5 | (authors-ignored-files): Ignore deleted cedet test files, and "*.el". | ||
| 6 | (authors-ambiguous-files): New list. | ||
| 7 | (authors-valid-file-names): Add some deleted files. | ||
| 8 | (authors-renamed-files-alist): Add font-setting.el, edt-user.doc. | ||
| 9 | (authors-disambiguate-file-name): New function. (Bug#5501) | ||
| 10 | (authors-canonical-file-name): Doc fix. | ||
| 11 | Don't warn about obsolete files. | ||
| 12 | (authors-canonical-file-name, authors-scan-el): | ||
| 13 | Use authors-disambiguate-file-name. | ||
| 14 | |||
| 1 | 2010-04-23 Stefan Monnier <monnier@iro.umontreal.ca> | 15 | 2010-04-23 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 16 | ||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-set-default): New function. | 17 | * emacs-lisp/bytecomp.el (byte-compile-set-default): New function. |
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 535df496088..7093ca78d3d 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el | |||
| @@ -220,6 +220,9 @@ If REALNAME is nil, ignore that author.") | |||
| 220 | '("vc-\\*\\.el$" | 220 | '("vc-\\*\\.el$" |
| 221 | "spec.txt$" | 221 | "spec.txt$" |
| 222 | ".*loaddefs.el$" ; not obsolete, but auto-generated | 222 | ".*loaddefs.el$" ; not obsolete, but auto-generated |
| 223 | "\\.\\(cvs\\|git\\)ignore$" ; obsolete or uninteresting | ||
| 224 | "\\.arch-inventory$" | ||
| 225 | "preferences\\.\\(nib\\|gorm\\)" | ||
| 223 | "vc-\\(rcs\\|cvs\\|sccs\\)-hooks\\.el$") | 226 | "vc-\\(rcs\\|cvs\\|sccs\\)-hooks\\.el$") |
| 224 | "List of regexps matching obsolete files. | 227 | "List of regexps matching obsolete files. |
| 225 | Changes to files matching one of the regexps in this list are not | 228 | Changes to files matching one of the regexps in this list are not |
| @@ -244,6 +247,14 @@ listed.") | |||
| 244 | "Imakefile" "icons/sink.ico" "aixcc.lex" | 247 | "Imakefile" "icons/sink.ico" "aixcc.lex" |
| 245 | "nxml/char-name/unicode" | 248 | "nxml/char-name/unicode" |
| 246 | "js2-mode.el" ; only installed very briefly, replaced by js.el | 249 | "js2-mode.el" ; only installed very briefly, replaced by js.el |
| 250 | "cedet/tests/testtemplates.cpp" | ||
| 251 | "cedet/tests/testusing.cpp" | ||
| 252 | "cedet/tests/scopetest.cpp" | ||
| 253 | "cedet/tests/scopetest.java" | ||
| 254 | "cedet/tests/test.cpp" | ||
| 255 | "cedet/tests/test.py" | ||
| 256 | "cedet/tests/teststruct.cpp" | ||
| 257 | "*.el" | ||
| 247 | ;; Autogen: | 258 | ;; Autogen: |
| 248 | "cus-load.el" "finder-inf.el" "ldefs-boot.el" | 259 | "cus-load.el" "finder-inf.el" "ldefs-boot.el" |
| 249 | ;; Never had any meaningful changes logged, now deleted: | 260 | ;; Never had any meaningful changes logged, now deleted: |
| @@ -286,6 +297,42 @@ listed.") | |||
| 286 | "List of files and directories to ignore. | 297 | "List of files and directories to ignore. |
| 287 | Changes to files in this list are not listed.") | 298 | Changes to files in this list are not listed.") |
| 288 | 299 | ||
| 300 | ;; List via: find . -name '*.el' | sed 's/.*\///g' | sort | uniq -d | ||
| 301 | ;; FIXME It would be better to discover these dynamically. | ||
| 302 | ;; Note that traditionally "Makefile.in" etc have not been in this list. | ||
| 303 | ;; Ditto for "abbrev.texi" etc. | ||
| 304 | (defconst authors-ambiguous-files | ||
| 305 | '("chart.el" | ||
| 306 | "compile.el" | ||
| 307 | "complete.el" | ||
| 308 | "cpp.el" | ||
| 309 | "ctxt.el" | ||
| 310 | "debug.el" | ||
| 311 | "dired.el" | ||
| 312 | "el.el" | ||
| 313 | "files.el" | ||
| 314 | "find.el" | ||
| 315 | "format.el" | ||
| 316 | "grep.el" | ||
| 317 | "imenu.el" | ||
| 318 | "java.el" | ||
| 319 | "linux.el" | ||
| 320 | "locate.el" | ||
| 321 | "make.el" | ||
| 322 | "mode.el" | ||
| 323 | "python.el" | ||
| 324 | "semantic.el" | ||
| 325 | "shell.el" | ||
| 326 | "simple.el" | ||
| 327 | "sort.el" | ||
| 328 | "speedbar.el" | ||
| 329 | "srecode.el" | ||
| 330 | "table.el" | ||
| 331 | "texi.el" | ||
| 332 | "util.el" | ||
| 333 | "wisent.el") | ||
| 334 | "List of basenames occurring more than once in the source.") | ||
| 335 | |||
| 289 | ;; FIXME :cowrote entries here can be overwritten by :wrote entries | 336 | ;; FIXME :cowrote entries here can be overwritten by :wrote entries |
| 290 | ;; derived from a file's Author: header (eg mh-e). This really means | 337 | ;; derived from a file's Author: header (eg mh-e). This really means |
| 291 | ;; the Author: header is erroneous. | 338 | ;; the Author: header is erroneous. |
| @@ -464,11 +511,14 @@ Changes to files in this list are not listed.") | |||
| 464 | "emacs16_mac.png" "emacs24_mac.png" | 511 | "emacs16_mac.png" "emacs24_mac.png" |
| 465 | "emacs256_mac.png" "emacs32_mac.png" | 512 | "emacs256_mac.png" "emacs32_mac.png" |
| 466 | "emacs48_mac.png" "emacs512_mac.png" | 513 | "emacs48_mac.png" "emacs512_mac.png" |
| 514 | "revdiff" ; admin/ | ||
| 515 | "mainmake" "sed1.inp" "sed2.inp" "sed3.inp" ; msdos/ | ||
| 516 | "mac-fix-env.m" | ||
| 467 | ;; Deleted vms stuff: | 517 | ;; Deleted vms stuff: |
| 468 | "temacs.opt" "descrip.mms" "compile.com" "link.com" | 518 | "temacs.opt" "descrip.mms" "compile.com" "link.com" |
| 469 | ) | 519 | ) |
| 470 | "File names which are valid, but no longer exist (or cannot be | 520 | "File names which are valid, but no longer exist (or cannot be found) |
| 471 | found) in the repository.") | 521 | in the repository.") |
| 472 | 522 | ||
| 473 | (defconst authors-renamed-files-alist | 523 | (defconst authors-renamed-files-alist |
| 474 | '(("nt.c" . "w32.c") ("nt.h" . "w32.h") | 524 | '(("nt.c" . "w32.c") ("nt.h" . "w32.h") |
| @@ -505,6 +555,7 @@ found) in the repository.") | |||
| 505 | ;; index and pick merged into search. | 555 | ;; index and pick merged into search. |
| 506 | ("mh-index.el" . "mh-search.el") | 556 | ("mh-index.el" . "mh-search.el") |
| 507 | ("mh-pick.el" . "mh-search.el") | 557 | ("mh-pick.el" . "mh-search.el") |
| 558 | ("font-setting.el" . "dynamic-setting.el") | ||
| 508 | ;; INSTALL-CVS -> .CVS -> .BZR | 559 | ;; INSTALL-CVS -> .CVS -> .BZR |
| 509 | ("INSTALL-CVS" . "INSTALL.BZR") | 560 | ("INSTALL-CVS" . "INSTALL.BZR") |
| 510 | ("INSTALL.CVS" . "INSTALL.BZR") | 561 | ("INSTALL.CVS" . "INSTALL.BZR") |
| @@ -530,6 +581,7 @@ found) in the repository.") | |||
| 530 | ("schema/docbook-dyntbl.rnc" . "schema/docbk-dyntbl.rnc") | 581 | ("schema/docbook-dyntbl.rnc" . "schema/docbk-dyntbl.rnc") |
| 531 | ("schema/docbook-soextbl.rnc" . "schema/docbk-soextbl.rn" ) | 582 | ("schema/docbook-soextbl.rnc" . "schema/docbk-soextbl.rn" ) |
| 532 | ("texi/url.txi" . "url.texi") | 583 | ("texi/url.txi" . "url.texi") |
| 584 | ("edt-user.doc" . "edt.texi") | ||
| 533 | ;; Moved to different directories. | 585 | ;; Moved to different directories. |
| 534 | ("ctags.1" . "ctags.1") | 586 | ("ctags.1" . "ctags.1") |
| 535 | ("etags.1" . "etags.1") | 587 | ("etags.1" . "etags.1") |
| @@ -574,10 +626,25 @@ Otherwise, the file name is accepted as is.") | |||
| 574 | (defvar authors-checked-files-alist) | 626 | (defvar authors-checked-files-alist) |
| 575 | (defvar authors-invalid-file-names) | 627 | (defvar authors-invalid-file-names) |
| 576 | 628 | ||
| 629 | (defun authors-disambiguate-file-name (fullname) | ||
| 630 | "Convert FULLNAME to an unambiguous relative-name." | ||
| 631 | (let ((relname (file-name-nondirectory fullname)) | ||
| 632 | parent) | ||
| 633 | (if (member relname authors-ambiguous-files) | ||
| 634 | ;; In case of ambiguity, just prepend the parent directory. | ||
| 635 | ;; FIXME obviously this is not a perfect solution. | ||
| 636 | (if (string-equal "lisp" | ||
| 637 | (setq parent (file-name-nondirectory | ||
| 638 | (directory-file-name | ||
| 639 | (file-name-directory fullname))))) | ||
| 640 | relname | ||
| 641 | (format "%s/%s" parent relname)) | ||
| 642 | relname))) | ||
| 643 | |||
| 577 | (defun authors-canonical-file-name (file log-file pos author) | 644 | (defun authors-canonical-file-name (file log-file pos author) |
| 578 | "Return canonical file name for FILE found in LOG-FILE. | 645 | "Return canonical file name for FILE found in LOG-FILE. |
| 579 | Checks whether FILE is a valid (existing) file name, has been renamed, | 646 | Checks whether FILE is a valid (existing) file name, has been renamed, |
| 580 | or is on the list of removed files. Returns the non-diretory part of | 647 | or is on the list of removed files. Returns the non-directory part of |
| 581 | the file name. Only uses the LOG-FILE position POS and associated AUTHOR | 648 | the file name. Only uses the LOG-FILE position POS and associated AUTHOR |
| 582 | to print a message if FILE is not found." | 649 | to print a message if FILE is not found." |
| 583 | ;; FILE should be re-checked in every different directory associated | 650 | ;; FILE should be re-checked in every different directory associated |
| @@ -594,7 +661,7 @@ to print a message if FILE is not found." | |||
| 594 | (file-exists-p file) | 661 | (file-exists-p file) |
| 595 | (file-exists-p relname) | 662 | (file-exists-p relname) |
| 596 | (file-exists-p (concat "etc/" relname))) | 663 | (file-exists-p (concat "etc/" relname))) |
| 597 | (setq valid relname) | 664 | (setq valid (authors-disambiguate-file-name fullname)) |
| 598 | (setq valid (assoc file authors-renamed-files-alist)) | 665 | (setq valid (assoc file authors-renamed-files-alist)) |
| 599 | (if valid | 666 | (if valid |
| 600 | (setq valid (cdr valid)) | 667 | (setq valid (cdr valid)) |
| @@ -611,6 +678,7 @@ to print a message if FILE is not found." | |||
| 611 | (cons (cons fullname valid) authors-checked-files-alist)) | 678 | (cons (cons fullname valid) authors-checked-files-alist)) |
| 612 | (unless (or valid | 679 | (unless (or valid |
| 613 | (member file authors-ignored-files) | 680 | (member file authors-ignored-files) |
| 681 | (authors-obsolete-file-p file) | ||
| 614 | (string-match "[*]" file) | 682 | (string-match "[*]" file) |
| 615 | (string-match "^[0-9.]+$" file)) | 683 | (string-match "^[0-9.]+$" file)) |
| 616 | (setq authors-invalid-file-names | 684 | (setq authors-invalid-file-names |
| @@ -759,7 +827,7 @@ TABLE is a hash table to add author information to." | |||
| 759 | (enable-local-variables :safe) ; for find-file, hence let* | 827 | (enable-local-variables :safe) ; for find-file, hence let* |
| 760 | (enable-local-eval nil) | 828 | (enable-local-eval nil) |
| 761 | (buffer (find-file-noselect file))) | 829 | (buffer (find-file-noselect file))) |
| 762 | (setq file (file-name-nondirectory file)) | 830 | (setq file (authors-disambiguate-file-name (expand-file-name file))) |
| 763 | (with-current-buffer buffer | 831 | (with-current-buffer buffer |
| 764 | (save-restriction | 832 | (save-restriction |
| 765 | (widen) | 833 | (widen) |