annotate lisp/lisp-mnt.el @ 219:262b8bb4a523 r20-4b8

Import from CVS: tag r20-4b8
author cvs
date Mon, 13 Aug 2007 10:09:35 +0200
parents
children 41f2f0e326e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
219
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
1 ;;; lisp-mnt.el --- minor mode for Emacs Lisp maintainers
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
2
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
3 ;; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
4
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
5 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
6 ;; Maintainer: Eric S. Raymond <esr@snark.thyrsus.com>
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
7 ;; Created: 14 Jul 1992
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
8 ;; Version: $Id: lisp-mnt.el,v 1.2 1997/12/06 22:26:15 steve Exp $
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
9 ;; Keywords: docs
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
10 ;; X-Modified-by: Bob Weiner <weiner@mot.com>, 4/14/95, to support InfoDock
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
11 ;; headers.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
12 ;; X-Bogus-Bureaucratic-Cruft: Gruad will get you if you don't watch out!
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
13
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
14 ;; This file is part of XEmacs.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
15
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
16 ;; XEmacs is free software; you can redistribute it and/or modify it
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
17 ;; under the terms of the GNU General Public License as published by
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
18 ;; the Free Software Foundation; either version 2, or (at your option)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
19 ;; any later version.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
20
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
21 ;; XEmacs is distributed in the hope that it will be useful, but
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
22 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
23 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
24 ;; General Public License for more details.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
25
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
26 ;; You should have received a copy of the GNU General Public License
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
27 ;; along with XEmacs; see the file COPYING. If not, write to the Free
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
28 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
29 ;; 02111-1307, USA.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
30
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
31 ;;; Synched up with: FSF 19.34.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
32
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
33 ;;; Commentary:
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
34
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
35 ;; This minor mode adds some services to Emacs-Lisp editing mode.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
36 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
37 ;; First, it knows about the header conventions for library packages.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
38 ;; One entry point supports generating synopses from a library directory.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
39 ;; Another can be used to check for missing headers in library files.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
40 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
41 ;; Another entry point automatically addresses bug mail to a package's
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
42 ;; maintainer or author.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
43
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
44 ;; This file can be loaded by your lisp-mode-hook. Have it (require 'lisp-mnt)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
45
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
46 ;; This file is an example of the header conventions. Note the following
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
47 ;; features:
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
48 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
49 ;; * Header line --- makes it possible to extract a one-line summary of
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
50 ;; the package's uses automatically for use in library synopses, KWIC
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
51 ;; indexes and the like.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
52 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
53 ;; Format is three semicolons, followed by the filename, followed by
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
54 ;; three dashes, followed by the summary. All fields space-separated.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
55 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
56 ;; * Author line --- contains the name and net address of at least
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
57 ;; the principal author.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
58 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
59 ;; If there are multiple authors, they should be listed on continuation
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
60 ;; lines led by ;;<TAB>, like this:
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
61 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
62 ;; ;; Author: Ashwin Ram <Ram-Ashwin@cs.yale.edu>
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
63 ;; ;; Dave Sill <de5@ornl.gov>
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
64 ;; ;; David Lawrence <tale@pawl.rpi.edu>
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
65 ;; ;; Noah Friedman <friedman@ai.mit.edu>
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
66 ;; ;; Joe Wells <jbw@maverick.uswest.com>
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
67 ;; ;; Dave Brennan <brennan@hal.com>
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
68 ;; ;; Eric Raymond <esr@snark.thyrsus.com>
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
69 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
70 ;; This field may have some special values; notably "FSF", meaning
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
71 ;; "Free Software Foundation".
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
72 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
73 ;; * Maintainer line --- should be a single name/address as in the Author
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
74 ;; line, or an address only, or the string "FSF". If there is no maintainer
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
75 ;; line, the person(s) in the Author field are presumed to be it. The example
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
76 ;; in this file is mildly bogus because the maintainer line is redundant.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
77 ;; The idea behind these two fields is to be able to write a Lisp function
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
78 ;; that does "send mail to the author" without having to mine the name out by
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
79 ;; hand. Please be careful about surrounding the network address with <> if
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
80 ;; there's also a name in the field.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
81 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
82 ;; * Created line --- optional, gives the original creation date of the
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
83 ;; file. For historical interest, basically.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
84 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
85 ;; * Version line --- intended to give the reader a clue if they're looking
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
86 ;; at a different version of the file than the one they're accustomed to. This
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
87 ;; may be an RCS or SCCS header.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
88 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
89 ;; * Adapted-By line --- this is for FSF's internal use. The person named
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
90 ;; in this field was the one responsible for installing and adapting the
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
91 ;; package for the distribution. (This file doesn't have one because the
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
92 ;; author *is* one of the maintainers.)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
93 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
94 ;; * Keywords line --- used by the finder code (now under construction)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
95 ;; for finding Emacs Lisp code related to a topic.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
96 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
97 ;; * X-Bogus-Bureaucratic-Cruft line --- this is a joke and an example
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
98 ;; of a comment header. Headers starting with `X-' should never be used
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
99 ;; for any real purpose; this is the way to safely add random headers
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
100 ;; without invoking the wrath of any program.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
101 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
102 ;; * Commentary line --- enables Lisp code to find the developer's and
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
103 ;; maintainers' explanations of the package internals.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
104 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
105 ;; * Change log line --- optional, exists to terminate the commentary
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
106 ;; section and start a change-log part, if one exists.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
107 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
108 ;; * Code line --- exists so Lisp can know where commentary and/or
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
109 ;; change-log sections end.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
110 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
111 ;; * Footer line --- marks end-of-file so it can be distinguished from
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
112 ;; an expanded formfeed or the results of truncation.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
113
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
114 ;;; Change Log:
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
115
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
116 ;; Tue Jul 14 23:44:17 1992 ESR
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
117 ;; * Created.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
118
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
119 ;;; Code:
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
120
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
121 (require 'picture) ; provides move-to-column-force
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
122 ;(require 'emacsbug)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
123
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
124 ;;; Variables:
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
125
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
126 (defvar lm-header-prefix "^;;*[ \t]+\\(@\(#\)\\)?[ \t]*\\([\$]\\)?"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
127 "Prefix that is ignored before the tag.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
128 For example, you can write the 1st line synopsis string and headers like this
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
129 in your Lisp package:
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
130
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
131 ;; @(#) package.el -- pacakge description
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
132 ;;
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
133 ;; @(#) $Maintainer: Person Foo Bar $
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
134
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
135 The @(#) construct is used by unix what(1) and
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
136 then $identifier: doc string $ is used by GNU ident(1)")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
137
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
138 (defvar lm-comment-column 16
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
139 "Column used for placing formatted output.")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
140
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
141 (defvar lm-commentary-header "Commentary\\|Documentation"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
142 "Regexp which matches start of documentation section.")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
143
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
144 (defvar lm-history-header "Change Log\\|History"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
145 "Regexp which matches the start of code log section.")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
146
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
147 ;;; Functions:
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
148
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
149 ;; These functions all parse the headers of the current buffer
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
150
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
151 (defsubst lm-get-header-re (header &optional mode)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
152 "Returns regexp for matching HEADER.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
153 If called with optional MODE and with value `section',
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
154 return section regexp instead."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
155 (cond ((eq mode 'section)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
156 (concat "^;;;;* " header ":[ \t]*$"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
157 (t
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
158 (concat lm-header-prefix header ":[ \t]*"))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
159
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
160 (defsubst lm-get-package-name ()
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
161 "Returns package name by looking at the first line."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
162 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
163 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
164 (if (and (looking-at (concat lm-header-prefix))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
165 (progn (goto-char (match-end 0))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
166 (looking-at "\\([^\t ]+\\)")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
167 (match-end 1)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
168 (buffer-substring (match-beginning 1) (match-end 1))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
169 )))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
170
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
171 (defun lm-section-mark (header &optional after)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
172 "Return the buffer location of a given section start marker.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
173 The HEADER is the section mark string to search for.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
174 If AFTER is non-nil, return the location of the next line."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
175 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
176 (let ((case-fold-search t))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
177 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
178 (if (re-search-forward (lm-get-header-re header 'section) nil t)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
179 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
180 (beginning-of-line)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
181 (if after (forward-line 1))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
182 (point))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
183 nil))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
184
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
185 (defsubst lm-code-mark ()
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
186 "Return the buffer location of the `Code' start marker."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
187 (lm-section-mark "Code"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
188
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
189 (defsubst lm-commentary-mark ()
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
190 "Return the buffer location of the `Commentary' start marker."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
191 (lm-section-mark lm-commentary-header))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
192
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
193 (defsubst lm-history-mark ()
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
194 "Return the buffer location of the `History' start marker."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
195 (lm-section-mark lm-history-header))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
196
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
197 (defun lm-header (header)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
198 "Return the contents of the header named HEADER."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
199 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
200 (let ((case-fold-search t))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
201 (if (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
202 ;; RCS ident likes format "$identifier: data$"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
203 (looking-at "\\([^$\n]+\\)")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
204 (match-end 1))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
205 (buffer-substring (match-beginning 1) (match-end 1))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
206 nil)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
207
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
208 (defun lm-header-multiline (header)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
209 "Return the contents of the header named HEADER, with continuation lines.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
210 The returned value is a list of strings, one per line."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
211 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
212 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
213 (let ((res (lm-header header)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
214 (cond
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
215 (res
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
216 (setq res (list res))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
217 (forward-line 1)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
218
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
219 (while (and (looking-at (concat lm-header-prefix "[\t ]+"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
220 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
221 (goto-char (match-end 0))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
222 (looking-at "\\(.*\\)"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
223 (match-end 1))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
224 (setq res (cons (buffer-substring
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
225 (match-beginning 1)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
226 (match-end 1))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
227 res))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
228 (forward-line 1))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
229 ))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
230 res
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
231 )))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
232
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
233 ;; These give us smart access to the header fields and commentary
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
234
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
235 (defun lm-summary (&optional file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
236 "Return the one-line summary of file FILE, or current buffer if FILE is nil."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
237 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
238 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
239 (find-file file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
240 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
241 (prog1
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
242 (if (and
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
243 (looking-at lm-header-prefix)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
244 (progn (goto-char (match-end 0))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
245 (looking-at "[^ ]+[ \t]+--+[ \t]+\\(.*\\)")))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
246 (buffer-substring (match-beginning 1) (match-end 1)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
247 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
248 (kill-buffer (current-buffer)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
249 )))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
250
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
251 (defun lm-crack-address (x)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
252 "Split up an email address into full name and real email address.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
253 The value is a cons of the form (FULLNAME . ADDRESS)."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
254 (cond ((string-match "\\(.+\\) [(<]\\(\\S-+@\\S-+\\)[>)]" x)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
255 (cons (substring x (match-beginning 1) (match-end 1))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
256 (substring x (match-beginning 2) (match-end 2))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
257 ((string-match "\\(\\S-+@\\S-+\\) [(<]\\(.*\\)[>)]" x)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
258 (cons (substring x (match-beginning 2) (match-end 2))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
259 (substring x (match-beginning 1) (match-end 1))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
260 ((string-match "\\S-+@\\S-+" x)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
261 (cons nil x))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
262 (t
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
263 (cons x nil))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
264
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
265 (defun lm-authors (&optional file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
266 "Return the author list of file FILE, or current buffer if FILE is nil.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
267 Each element of the list is a cons; the car is the full name,
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
268 the cdr is an email address."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
269 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
270 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
271 (find-file file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
272 ;; XEmacs change (Is E-MAIL an infodock header? -sb)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
273 (let* ((authorlist (lm-header-multiline "author"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
274 (email-list (lm-header-multiline "E-MAIL"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
275 (authors authorlist))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
276 (prog1
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
277 (if (null email-list)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
278 (mapcar 'lm-crack-address authorlist)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
279 (while (and email-list authors)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
280 (setcar authors (cons (car authors) (car email-list)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
281 (setq email-list (cdr email-list)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
282 authors (cdr authors)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
283 authorlist)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
284 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
285 (kill-buffer (current-buffer))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
286 )))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
287
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
288 (defun lm-maintainer (&optional file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
289 "Return the maintainer of file FILE, or current buffer if FILE is nil.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
290 The return value has the form (NAME . ADDRESS)."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
291 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
292 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
293 (find-file file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
294 (prog1
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
295 (let ((maint (lm-header "maintainer")))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
296 (if maint
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
297 (lm-crack-address maint)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
298 (car (lm-authors))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
299 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
300 (kill-buffer (current-buffer))))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
301
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
302 (defun lm-creation-date (&optional file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
303 "Return the created date given in file FILE, or current buffer if FILE is nil."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
304 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
305 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
306 (find-file file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
307 (prog1
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
308 ;; XEmacs change (Is ORIG-DATE an Infodock header? -sb)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
309 (or (lm-header "created")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
310 (let ((date-and-time (lm-header "ORIG-DATE")))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
311 (if date-and-time
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
312 (substring date-and-time 0
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
313 (string-match " " date-and-time)))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
314 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
315 (kill-buffer (current-buffer)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
316 )))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
317
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
318 (defun lm-last-modified-date (&optional file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
319 "Return the modify-date given in file FILE, or current buffer if FILE is nil."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
320 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
321 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
322 (find-file file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
323 (prog1
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
324 (if (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
325 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
326 (re-search-forward
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
327 "\\$Id: [^ ]+ [^ ]+ \\([^/]+\\)/\\([^/]+\\)/\\([^ ]+\\) "
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
328 (lm-code-mark) t))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
329 (format "%s %s %s"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
330 (buffer-substring (match-beginning 3) (match-end 3))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
331 (nth (string-to-int
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
332 (buffer-substring (match-beginning 2) (match-end 2)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
333 '("" "Jan" "Feb" "Mar" "Apr" "May" "Jun"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
334 "Jul" "Aug" "Sep" "Oct" "Nov" "Dec"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
335 (buffer-substring (match-beginning 1) (match-end 1)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
336 ;; XEmacs change (Infodock change? -sb)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
337 (let ((date-and-time (lm-header "LAST-MOD")))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
338 (if date-and-time
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
339 (substring date-and-time 0
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
340 (string-match " " date-and-time)))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
341 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
342 (kill-buffer (current-buffer)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
343 )))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
344
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
345 (defun lm-version (&optional file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
346 "Return the version listed in file FILE, or current buffer if FILE is nil.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
347 This can befound in an RCS or SCCS header to crack it out of."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
348 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
349 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
350 (find-file file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
351 (prog1
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
352 (or
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
353 (lm-header "version")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
354 (let ((header-max (lm-code-mark)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
355 (goto-char (point-min))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
356 (cond
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
357 ;; Look for an RCS header
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
358 ((re-search-forward "\\$Id: [^ ]+ \\([^ ]+\\) " header-max t)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
359 (buffer-substring (match-beginning 1) (match-end 1)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
360
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
361 ;; Look for an SCCS header
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
362 ((re-search-forward
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
363 (concat
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
364 (regexp-quote "@(#)")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
365 (regexp-quote (file-name-nondirectory (buffer-file-name)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
366 "\t\\([012345679.]*\\)")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
367 header-max t)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
368 (buffer-substring (match-beginning 1) (match-end 1)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
369
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
370 (t nil))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
371 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
372 (kill-buffer (current-buffer)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
373 )))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
374
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
375 (defun lm-keywords (&optional file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
376 "Return the keywords given in file FILE, or current buffer if FILE is nil."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
377 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
378 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
379 (find-file file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
380 (prog1
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
381 (let ((keywords (lm-header "keywords")))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
382 (and keywords (downcase keywords)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
383 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
384 (kill-buffer (current-buffer)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
385 )))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
386
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
387 (defun lm-adapted-by (&optional file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
388 "Return the adapted-by names in file FILE, or current buffer if FILE is nil.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
389 This is the name of the person who cleaned up this package for
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
390 distribution."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
391 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
392 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
393 (find-file file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
394 (prog1
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
395 (lm-header "adapted-by")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
396 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
397 (kill-buffer (current-buffer)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
398 )))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
399
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
400 (defun lm-commentary (&optional file)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
401 "Return the commentary in file FILE, or current buffer if FILE is nil.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
402 The value is returned as a string. In the text, the commentary starts
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
403 with tag `Commentary' and ends with tag `Change Log' or `History'."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
404 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
405 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
406 (find-file file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
407 (prog1
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
408 (let ((commentary (lm-commentary-mark))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
409 (change-log (lm-history-mark))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
410 (code (lm-code-mark))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
411 )
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
412 (cond
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
413 ((and commentary change-log)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
414 (buffer-substring commentary change-log))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
415 ((and commentary code)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
416 (buffer-substring commentary code))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
417 (t
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
418 ;; XEmacs change (Infodock headers? -sb)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
419 (setq commentary (lm-section-mark "DESCRIPTION" t)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
420 code (lm-section-mark "DESCRIP-END"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
421 (and commentary end (buffer-substring commentary code)))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
422 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
423 (kill-buffer (current-buffer)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
424 )))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
425
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
426 ;;; Verification and synopses
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
427
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
428 (defun lm-insert-at-column (col &rest strings)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
429 "Insert list of STRINGS, at column COL."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
430 (if (> (current-column) col) (insert "\n"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
431 (move-to-column-force col)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
432 (apply 'insert strings))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
433
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
434 (defun lm-verify (&optional file showok &optional verb)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
435 "Check that the current buffer (or FILE if given) is in proper format.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
436 If FILE is a directory, recurse on its files and generate a report in
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
437 a temporary buffer."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
438 (interactive)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
439 (let* ((verb (or verb (interactive-p)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
440 ret
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
441 name
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
442 )
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
443 (if verb
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
444 (setq ret "Ok.")) ;init value
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
445
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
446 (if (and file (file-directory-p file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
447 (setq
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
448 ret
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
449 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
450 (switch-to-buffer (get-buffer-create "*lm-verify*"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
451 (erase-buffer)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
452 (mapcar
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
453 '(lambda (f)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
454 (if (string-match ".*\\.el$" f)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
455 (let ((status (lm-verify f)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
456 (if status
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
457 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
458 (insert f ":")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
459 (lm-insert-at-column lm-comment-column status "\n"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
460 (and showok
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
461 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
462 (insert f ":")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
463 (lm-insert-at-column lm-comment-column "OK\n")))))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
464 (directory-files file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
465 ))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
466 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
467 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
468 (find-file file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
469 (setq name (lm-get-package-name))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
470
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
471 (setq
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
472 ret
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
473 (prog1
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
474 (cond
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
475 ((null name)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
476 "Can't find a package NAME")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
477
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
478 ((not (lm-authors))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
479 "Author: tag missing.")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
480
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
481 ((not (lm-maintainer))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
482 "Maintainer: tag missing.")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
483
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
484 ((not (lm-summary))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
485 "Can't find a one-line 'Summary' description")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
486
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
487 ((not (lm-keywords))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
488 "Keywords: tag missing.")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
489
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
490 ((not (lm-commentary-mark))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
491 "Can't find a 'Commentary' section marker.")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
492
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
493 ((not (lm-history-mark))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
494 "Can't find a 'History' section marker.")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
495
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
496 ((not (lm-code-mark))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
497 "Can't find a 'Code' section marker")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
498
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
499 ((progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
500 (goto-char (point-max))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
501 (not
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
502 (re-search-backward
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
503 (concat "^;;;[ \t]+" name "[ \t]+ends here[ \t]*$"
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
504 "\\|^;;;[ \t]+ End of file[ \t]+" name)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
505 nil t
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
506 )))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
507 (format "Can't find a footer line for [%s]" name))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
508 (t
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
509 ret))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
510 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
511 (kill-buffer (current-buffer)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
512 ))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
513 (if verb
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
514 (message ret))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
515 ret
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
516 ))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
517
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
518 (defun lm-synopsis (&optional file showall)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
519 "Generate a synopsis listing for the buffer or the given FILE if given.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
520 If FILE is a directory, recurse on its files and generate a report in
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
521 a temporary buffer. If SHOWALL is non-nil, also generate a line for files
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
522 which do not include a recognizable synopsis."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
523 (interactive
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
524 (list
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
525 (read-file-name "Synopsis for (file or dir): ")))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
526
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
527 (if (and file (file-directory-p file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
528 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
529 (switch-to-buffer (get-buffer-create "*lm-verify*"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
530 (erase-buffer)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
531 (mapcar
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
532 '(lambda (f)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
533 (if (string-match ".*\\.el$" f)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
534 (let ((syn (lm-synopsis f)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
535 (if syn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
536 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
537 (insert f ":")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
538 (lm-insert-at-column lm-comment-column syn "\n"))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
539 (and showall
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
540 (progn
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
541 (insert f ":")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
542 (lm-insert-at-column lm-comment-column "NA\n")))))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
543 (directory-files file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
544 )
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
545 (save-excursion
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
546 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
547 (find-file file))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
548 (prog1
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
549 (lm-summary)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
550 (if file
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
551 (kill-buffer (current-buffer)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
552 ))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
553
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
554 (defun lm-report-bug (topic)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
555 "Report a bug in the package currently being visited to its maintainer.
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
556 Prompts for bug subject. Leaves you in a mail buffer."
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
557 (interactive "sBug Subject: ")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
558 (let ((package (lm-get-package-name))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
559 (addr (lm-maintainer))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
560 (version (lm-version)))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
561 (mail nil
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
562 (if addr
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
563 (concat (car addr) " <" (cdr addr) ">")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
564 bug-gnu-emacs)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
565 topic)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
566 (goto-char (point-max))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
567 (insert "\nIn "
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
568 package
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
569 (if version (concat " version " version) "")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
570 "\n\n")
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
571 (message
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
572 (substitute-command-keys "Type \\[mail-send] to send bug report."))))
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
573
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
574 (provide 'lisp-mnt)
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
575
262b8bb4a523 Import from CVS: tag r20-4b8
cvs
parents:
diff changeset
576 ;;; lisp-mnt.el ends here