/[emacs]/emacs/lisp/emacs-lisp/lisp-mnt.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/lisp-mnt.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33 by gerd, Fri Oct 5 09:30:59 2001 UTC revision 1.34 by rms, Sun Dec 9 21:47:36 2001 UTC
# Line 47  Line 47 
47  ;;  ;;
48  ;;    Format is three semicolons, followed by the filename, followed by  ;;    Format is three semicolons, followed by the filename, followed by
49  ;; three dashes, followed by the summary.  All fields space-separated.  ;; three dashes, followed by the summary.  All fields space-separated.
50    ;;
51    ;;    * A blank line
52    ;;
53    ;;    * Copyright line, which looks more or less like this:
54    ;;
55    ;;       ;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
56    ;;
57    ;;    * A blank line
58  ;;  ;;
59  ;;    * Author line --- contains the name and net address of at least  ;;    * Author line --- contains the name and net address of at least
60  ;; the principal author.  ;; the principal author.
# Line 417  tags `Code', `Change Log' or `History'." Line 425  tags `Code', `Change Log' or `History'."
425    (move-to-column col t)    (move-to-column col t)
426    (apply 'insert strings))    (apply 'insert strings))
427    
428  (defun lm-verify (&optional file showok verb)  (defun lm-verify (&optional file showok verbose non-fsf-ok)
429    "Check that the current buffer (or FILE if given) is in proper format.    "Check that the current buffer (or FILE if given) is in proper format.
430  If FILE is a directory, recurse on its files and generate a report in a  If FILE is a directory, recurse on its files and generate a report in a
431  temporary buffer.  temporary buffer.  In that case, the optional argument SHOWOK
432  Optional argument SHOWOK indicates that \"OK\" be displayed in the temp buffer.  says display \"OK\" in temp buffer for files that have no problems.
433  Optional argument VERB specifies verbosity."  
434    (interactive)  Optional argument VERBOSE specifies verbosity level.
435    (let* ((verb (or verb (interactive-p)))  Optional argument NON-FSF-OK if non-nil means a non-FSF
436           (ret (and verb "Ok."))  copyright notice is allowed."
437      (interactive (list nil nil t))
438      (let* ((ret (and verbose "Ok"))
439           name)           name)
440      (if (and file (file-directory-p file))      (if (and file (file-directory-p file))
441          (setq ret          (setq ret
# Line 447  Optional argument VERB specifies verbosi Line 457  Optional argument VERB specifies verbosi
457          (setq ret          (setq ret
458                (cond                (cond
459                 ((null name)                 ((null name)
460                  "Can't find a package NAME")                  (format "Package %s does not exist"))
461                 ((not (lm-authors))                 ((not (lm-authors))
462                  "Author: tag missing.")                  "`Author:' tag missing")
463                 ((not (lm-maintainer))                 ((not (lm-maintainer))
464                  "Maintainer: tag missing.")                  "`Maintainer:' tag missing")
465                 ((not (lm-summary))                 ((not (lm-summary))
466                  "Can't find a one-line 'Summary' description")                  "Can't find the one-line summary description")
467                 ((not (lm-keywords))                 ((not (lm-keywords))
468                  "Keywords: tag missing.")                  "`Keywords:' tag missing")
469                 ((not (lm-keywords-finder-p))                 ((not (lm-keywords-finder-p))
470                  "Keywords: no valid finder keywords.")                  "`Keywords:' has no valid finder keywords (see `finder-known-keywords')")
471                 ((not (lm-commentary-mark))                 ((not (lm-commentary-mark))
472                  "Can't find a 'Commentary' section marker.")                  "Can't find a 'Commentary' section marker")
473                 ((not (lm-history-mark))                 ((not (lm-history-mark))
474                  "Can't find a 'History' section marker.")                  "Can't find a 'History' section marker")
475                 ((not (lm-code-mark))                 ((not (lm-code-mark))
476                  "Can't find a 'Code' section marker")                  "Can't find a 'Code' section marker")
477                 ((progn                 ((progn
# Line 471  Optional argument VERB specifies verbosi Line 481  Optional argument VERB specifies verbosi
481                      (concat "^;;;[ \t]+" name "[ \t]+ends here[ \t]*$"                      (concat "^;;;[ \t]+" name "[ \t]+ends here[ \t]*$"
482                              "\\|^;;;[ \t]+ End of file[ \t]+" name)                              "\\|^;;;[ \t]+ End of file[ \t]+" name)
483                      nil t)))                      nil t)))
484                  (format "Can't find a footer line for [%s]" name))                  (format "Can't find a footer line"))
485                 ((not (and (lm-copyright-mark) (lm-crack-copyright)))                 ((not (and (lm-copyright-mark) (lm-crack-copyright)))
486                  "Can't find a valid Copyright")                  "Can't find a valid copyright notice")
487                 ((not (string-match "Free Software Foundation"                 ((not (or non-fsf-ok
488                                     (car (lm-crack-copyright))))                           (string-match "Free Software Foundation"
489                  "Copyright Holder is not the Free Software Foundation.")                                         (car (lm-crack-copyright)))))
490                    "Copyright holder is not the Free Software Foundation")
491                 (t                 (t
492                  ret)))))                  ret)))))
493      (if verb      (if verbose
494          (message ret))          (message ret))
495      ret))      ret))
496    

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26