]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/lisp-mnt.el
Use use-region-p in prolog.el
[gnu-emacs] / lisp / emacs-lisp / lisp-mnt.el
index f2e691102d4a752684ba343e2d4a770cfb0f994f..46373da5eb91b5c8ad4421d97e2b2b9671127aa3 100644 (file)
@@ -1,10 +1,10 @@
 ;;; lisp-mnt.el --- utility functions for Emacs Lisp maintainers
 
-;; Copyright (C) 1992, 1994, 1997, 2000-2013 Free Software Foundation,
+;; Copyright (C) 1992, 1994, 1997, 2000-2016 Free Software Foundation,
 ;; Inc.
 
 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Created: 14 Jul 1992
 ;; Keywords: docs
 ;; X-Bogus-Bureaucratic-Cruft: Gruad will get you if you don't watch out!
 ;; ;;  Dave Brennan <brennan@hal.com>
 ;; ;;  Eric Raymond <esr@snark.thyrsus.com>
 ;;
-;; This field may have some special values; notably "FSF", meaning
-;; "Free Software Foundation".
-;;
 ;;    * Maintainer line --- should be a single name/address as in the Author
-;; line, or an address only, or the string "FSF".  If there is no maintainer
+;; line, or an address only.  If there is no maintainer
 ;; line, the person(s) in the Author field are presumed to be it.
 ;;    The idea behind these two fields is to be able to write a Lisp function
 ;; that does "send mail to the author" without having to mine the name out by
 ;; at a different version of the file than the one they're accustomed to.  This
 ;; may be an RCS or SCCS header.
 ;;
-;;    * Adapted-By line --- this is for FSF's internal use.  The person named
-;; in this field was the one responsible for installing and adapting the
-;; package for the distribution.  (This file doesn't have one because the
-;; author *is* one of the maintainers.)
+;;    * Adapted-By line --- this was used historically when some files
+;; were added to Emacs.  The person named in this field installed and
+;; (possibly adapted) the package in the Emacs distribution.
 ;;
 ;;    * Keywords line --- used by the finder code for finding Emacs
 ;; Lisp code related to a topic.
@@ -440,8 +436,10 @@ This can be found in an RCS or SCCS header."
           ;; Look for an SCCS header
           ((re-search-forward
             (concat
-             (regexp-quote "@(#)")
-             (regexp-quote (file-name-nondirectory (buffer-file-name)))
+             "@(#)"
+              (if buffer-file-name
+                  (regexp-quote (file-name-nondirectory buffer-file-name))
+                "[^\t\n]+")
              "\t\\([012345679.]*\\)")
             header-max t)
            (match-string-no-properties 1)))))))
@@ -461,8 +459,8 @@ each line."
   (let ((keywords (lm-keywords file)))
     (if keywords
        (if (string-match-p "," keywords)
-           (split-string keywords ",[ \t\n]*" t)
-         (split-string keywords "[ \t\n]+" t)))))
+           (split-string keywords ",[ \t\n]*" t "[ ]+")
+         (split-string keywords "[ \t\n]+" t "[ ]+")))))
 
 (defvar finder-known-keywords)
 (defun lm-keywords-finder-p (&optional file)
@@ -553,11 +551,11 @@ copyright notice is allowed."
               ((not (lm-keywords-finder-p))
                "`Keywords:' has no valid finder keywords (see `finder-known-keywords')")
               ((not (lm-commentary-mark))
-               "Can't find a 'Commentary' section marker")
+               "Can't find a `Commentary' section marker")
               ((not (lm-history-mark))
-               "Can't find a 'History' section marker")
+               "Can't find a `History' section marker")
               ((not (lm-code-mark))
-               "Can't find a 'Code' section marker")
+               "Can't find a `Code' section marker")
               ((progn
                  (goto-char (point-max))
                  (not