diff options
| author | Ken Raeburn <raeburn@raeburn.org> | 2015-11-01 01:42:21 -0400 |
|---|---|---|
| committer | Ken Raeburn <raeburn@raeburn.org> | 2015-11-01 01:42:21 -0400 |
| commit | 39372e1a1032521be74575bb06f95a3898fbae30 (patch) | |
| tree | 754bd242a23d2358ea116126fcb0a629947bd9ec /lisp/emacs-lisp/lisp-mnt.el | |
| parent | 6a3121904d76e3b2f63007341d48c5c1af55de80 (diff) | |
| parent | e11aaee266da52937a3a031cb108fe13f68958c3 (diff) | |
| download | emacs-39372e1a1032521be74575bb06f95a3898fbae30.tar.gz | |
merge from trunk
Diffstat (limited to 'lisp/emacs-lisp/lisp-mnt.el')
| -rw-r--r-- | lisp/emacs-lisp/lisp-mnt.el | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index f2e691102d4..393f0dd99e8 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -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-2015 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! @@ -70,11 +70,8 @@ ;; ;; 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 @@ -88,10 +85,9 @@ ;; 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. @@ -269,16 +265,17 @@ a section." (defun lm-header (header) "Return the contents of the header named HEADER." - (goto-char (point-min)) - (let ((case-fold-search t)) - (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) - ;; RCS ident likes format "$identifier: data$" - (looking-at - (if (save-excursion - (skip-chars-backward "^$" (match-beginning 0)) - (= (point) (match-beginning 0))) - "[^\n]+" "[^$\n]+"))) - (match-string-no-properties 0)))) + (save-excursion + (goto-char (point-min)) + (let ((case-fold-search t)) + (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) + ;; RCS ident likes format "$identifier: data$" + (looking-at + (if (save-excursion + (skip-chars-backward "^$" (match-beginning 0)) + (= (point) (match-beginning 0))) + "[^\n]+" "[^$\n]+"))) + (match-string-no-properties 0))))) (defun lm-header-multiline (header) "Return the contents of the header named HEADER, with continuation lines. @@ -440,8 +437,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 +460,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 +552,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 |
