# HG changeset patch # User Gerd Moellmann # Date 986378301 0 # Node ID c29d2430fdd9aaceb9c17cf991627fb8b066288a # Parent 5e4515f187829d6adfd913c522eea030e49c465d (lm-keywords-list, lm-keywords-finder-p): New functions. (lm-verify): Check keywords. From: Eric M. Ludlam . diff -r 5e4515f18782 -r c29d2430fdd9 lisp/emacs-lisp/lisp-mnt.el --- a/lisp/emacs-lisp/lisp-mnt.el Wed Apr 04 00:51:48 2001 +0000 +++ b/lisp/emacs-lisp/lisp-mnt.el Wed Apr 04 09:58:21 2001 +0000 @@ -370,6 +370,23 @@ (let ((keywords (lm-header "keywords"))) (and keywords (downcase keywords))))) +(defun lm-keywords-list (&optional file) + "Return list of keywords given in file FILE." + (let ((keywords (lm-keywords file))) + (if keywords + (split-string keywords ",?[ \t]")))) + +(defun lm-keywords-finder-p (&optional file) + "Return non-nil if any keywords in FILE are known to finder." + (require 'finder) + (let ((keys (lm-keywords-list file))) + (catch 'keyword-found + (while keys + (if (assoc (intern (car keys)) finder-known-keywords) + (throw 'keyword-found t)) + (setq keys (cdr keys))) + nil))) + (defun lm-adapted-by (&optional file) "Return the adapted-by names in file FILE, or current buffer if FILE is nil. This is the name of the person who cleaned up this package for @@ -439,6 +456,8 @@ "Can't find a one-line 'Summary' description") ((not (lm-keywords)) "Keywords: tag missing.") + ((not (lm-keywords-finder-p)) + "Keywords: no valid finder keywords.") ((not (lm-commentary-mark)) "Can't find a 'Commentary' section marker.") ((not (lm-history-mark))