annotate lisp/emacs-lisp/gulp.el @ 100035:2fc82decfdd6

(Line Truncation): Add reference to Continuation Lines.
author Martin Rudalics <rudalics@gmx.at>
date Sat, 29 Nov 2008 13:35:51 +0000
parents 90a2847062be
children a9dc0e7c3f2b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38412
253f761ad37b Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents: 29581
diff changeset
1 ;;; gulp.el --- ask for updates for Lisp packages
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
74466
1d4b1a32fd66 Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 68648
diff changeset
3 ;; Copyright (C) 1996, 2001, 2002, 2003, 2004, 2005,
79704
78ee6fae0e41 Add 2008 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 78217
diff changeset
4 ;; 2006, 2007, 2008 Free Software Foundation, Inc.
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 ;; Author: Sam Shteingold <shteingd@math.ucla.edu>
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 ;; Maintainer: FSF
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 ;; Keywords: maintenance
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11
94655
90a2847062be Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
94655
90a2847062be Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
14 ;; the Free Software Foundation, either version 3 of the License, or
90a2847062be Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
15 ;; (at your option) any later version.
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20 ;; GNU General Public License for more details.
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
94655
90a2847062be Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 ;;; Commentary:
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;; Search the emacs/{version}/lisp directory for *.el files, extract the
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 ;; name of the author or maintainer and send him e-mail requesting
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 ;; update.
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 ;;; Code:
21365
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
32 (defgroup gulp nil
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
33 "Ask for updates for Lisp packages."
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
34 :prefix "-"
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
35 :group 'maint)
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36
21365
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
37 (defcustom gulp-discard "^;+ *Maintainer: *FSF *$"
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
38 "*The regexp matching the packages not requiring the request for updates."
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
39 :type 'regexp
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
40 :group 'gulp)
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41
21365
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
42 (defcustom gulp-tmp-buffer "*gulp*" "The name of the temporary buffer."
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
43 :type 'string
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
44 :group 'gulp)
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45
21365
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
46 (defcustom gulp-max-len 2000
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
47 "*Distance into a Lisp source file to scan for keywords."
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
48 :type 'integer
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
49 :group 'gulp)
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50
21365
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
51 (defcustom gulp-request-header
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
52 (concat
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
53 "This message was created automatically.
18012
d0f4e2e9e1f8 (gulp-send-requests): Sort maintainers alphabetically.
Richard M. Stallman <rms@gnu.org>
parents: 15742
diff changeset
54 I'm going to start pretesting a new version of GNU Emacs soon, so I'd
d0f4e2e9e1f8 (gulp-send-requests): Sort maintainers alphabetically.
Richard M. Stallman <rms@gnu.org>
parents: 15742
diff changeset
55 like to ask if you have any updates for the Emacs packages you work on.
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
56 You're listed as the maintainer of the following package(s):\n\n")
21365
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
57 "*The starting text of a gulp message."
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
58 :type 'string
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
59 :group 'gulp)
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60
21365
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
61 (defcustom gulp-request-end
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
62 (concat
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
63 "\nIf you have any changes since the version in the previous release ("
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
64 (format "%d.%d" emacs-major-version emacs-minor-version)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
65 "),
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
66 please send them to me ASAP.
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67
18012
d0f4e2e9e1f8 (gulp-send-requests): Sort maintainers alphabetically.
Richard M. Stallman <rms@gnu.org>
parents: 15742
diff changeset
68 Please don't send the whole file. Instead, please send a patch made with
d0f4e2e9e1f8 (gulp-send-requests): Sort maintainers alphabetically.
Richard M. Stallman <rms@gnu.org>
parents: 15742
diff changeset
69 `diff -c' that shows precisely the changes you would like me to install.
d0f4e2e9e1f8 (gulp-send-requests): Sort maintainers alphabetically.
Richard M. Stallman <rms@gnu.org>
parents: 15742
diff changeset
70 Also please include itemized change log entries for your changes;
d0f4e2e9e1f8 (gulp-send-requests): Sort maintainers alphabetically.
Richard M. Stallman <rms@gnu.org>
parents: 15742
diff changeset
71 please use lisp/ChangeLog as a guide for the style and for what kinds
d0f4e2e9e1f8 (gulp-send-requests): Sort maintainers alphabetically.
Richard M. Stallman <rms@gnu.org>
parents: 15742
diff changeset
72 of information to include.
d0f4e2e9e1f8 (gulp-send-requests): Sort maintainers alphabetically.
Richard M. Stallman <rms@gnu.org>
parents: 15742
diff changeset
73
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
74 Thanks.")
21365
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
75 "*The closing text in a gulp message."
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
76 :type 'string
db005054f15d Customized.
Stephen Eglen <stephen@gnu.org>
parents: 21044
diff changeset
77 :group 'gulp)
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
78
87113
aa25402f888a Remove directory part from filenames in function declarations.
Glenn Morris <rgm@gnu.org>
parents: 86247
diff changeset
79 (declare-function mail-subject "sendmail" ())
aa25402f888a Remove directory part from filenames in function declarations.
Glenn Morris <rgm@gnu.org>
parents: 86247
diff changeset
80 (declare-function mail-send "sendmail" ())
86247
fc93e9674475 * progmodes/python.el (info-lookup-maybe-add-help):
Dan Nicolaescu <dann@ics.uci.edu>
parents: 78217
diff changeset
81
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
82 (defun gulp-send-requests (dir &optional time)
15179
be7cc250142a (gulp-search-path, gulp-packages): Variable deleted.
Richard M. Stallman <rms@gnu.org>
parents: 15178
diff changeset
83 "Send requests for updates to the authors of Lisp packages in directory DIR.
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
84 For each maintainer, the message consists of `gulp-request-header',
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
85 followed by the list of packages (with modification times if the optional
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
86 prefix argument TIME is non-nil), concluded with `gulp-request-end'.
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
87
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
88 You can't edit the messages, but you can confirm whether to send each one.
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
90 The list of addresses for which you decided not to send mail
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
91 is left in the `*gulp*' buffer at the end."
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
92 (interactive "DRequest updates for Lisp directory: \nP")
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
93 (save-excursion
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
94 (set-buffer (get-buffer-create gulp-tmp-buffer))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
95 (let ((m-p-alist (gulp-create-m-p-alist
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
96 (directory-files dir nil "^[^=].*\\.el$" t)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
97 dir))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
98 ;; Temporarily inhibit undo in the *gulp* buffer.
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
99 (buffer-undo-list t)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
100 mail-setup-hook msg node)
18012
d0f4e2e9e1f8 (gulp-send-requests): Sort maintainers alphabetically.
Richard M. Stallman <rms@gnu.org>
parents: 15742
diff changeset
101 (setq m-p-alist
21044
acdb727611dd (gulp-send-requests): Call sort properly.
Richard M. Stallman <rms@gnu.org>
parents: 18012
diff changeset
102 (sort m-p-alist
acdb727611dd (gulp-send-requests): Call sort properly.
Richard M. Stallman <rms@gnu.org>
parents: 18012
diff changeset
103 (function (lambda (a b)
acdb727611dd (gulp-send-requests): Call sort properly.
Richard M. Stallman <rms@gnu.org>
parents: 18012
diff changeset
104 (string< (car a) (car b))))))
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
105 (while (setq node (car m-p-alist))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
106 (setq msg (gulp-create-message (cdr node) time))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
107 (setq mail-setup-hook
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 48341
diff changeset
108 (lambda ()
29581
4d69640ddf11 (gulp-send-requests): Don't quote lambda.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 28650
diff changeset
109 (mail-subject)
4d69640ddf11 (gulp-send-requests): Don't quote lambda.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 28650
diff changeset
110 (insert "It's time for Emacs updates again")
4d69640ddf11 (gulp-send-requests): Don't quote lambda.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 28650
diff changeset
111 (goto-char (point-max))
4d69640ddf11 (gulp-send-requests): Don't quote lambda.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 28650
diff changeset
112 (insert msg)))
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
113 (mail nil (car node))
21044
acdb727611dd (gulp-send-requests): Call sort properly.
Richard M. Stallman <rms@gnu.org>
parents: 18012
diff changeset
114 (goto-char (point-min))
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
115 (if (y-or-n-p "Send? ") (mail-send)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
116 (kill-this-buffer)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
117 (set-buffer gulp-tmp-buffer)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
118 (insert (format "%s\n\n" node)))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
119 (setq m-p-alist (cdr m-p-alist))))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
120 (set-buffer gulp-tmp-buffer)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
121 (setq buffer-undo-list nil)))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
122
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
123
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
124 (defun gulp-create-message (rec time)
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125 "Return the message string for REC, which is a list like (FILE TIME)."
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 (let (node (str gulp-request-header))
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 (while (setq node (car rec))
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
128 (setq str (concat str "\t" (car node)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
129 (if time (concat "\tLast modified:\t" (cdr node)))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
130 "\n"))
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 (setq rec (cdr rec)))
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 (concat str gulp-request-end)))
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
135 (defun gulp-create-m-p-alist (flist dir)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
136 "Create the maintainer/package alist for files in FLIST in DIR.
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
137 That is a list of elements, each of the form (MAINTAINER PACKAGES...)."
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 (save-excursion
18012
d0f4e2e9e1f8 (gulp-send-requests): Sort maintainers alphabetically.
Richard M. Stallman <rms@gnu.org>
parents: 15742
diff changeset
139 (let (mplist filen node mnt-tm mnt tm fl-tm)
15211
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
140 (get-buffer-create gulp-tmp-buffer)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
141 (set-buffer gulp-tmp-buffer)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
142 (setq buffer-undo-list t)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
143 (while flist
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
144 (setq fl-tm (gulp-maintainer (setq filen (car flist)) dir))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
145 (if (setq tm (cdr fl-tm) mnt (car fl-tm));; there is a definite maintainer
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
146 (if (setq node (assoc mnt mplist));; this is not a new maintainer
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
147 (setq mplist (cons (cons mnt (cons (cons filen tm) (cdr node)))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
148 (delete node mplist)))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
149 (setq mplist (cons (list mnt (cons filen (cdr fl-tm))) mplist))))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
150 (setq flist (cdr flist)))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
151 (erase-buffer)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
152 mplist)))
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
153
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
154 (defun gulp-maintainer (filenm dir)
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
155 "Return a list (MAINTAINER TIMESTAMP) for the package FILENM in directory DIR."
6bcff02ade49 Lots of fixes.
Richard M. Stallman <rms@gnu.org>
parents: 15179
diff changeset
156 (save-excursion
28650
31505c4d5daf (gulp-maintainer): Use expand-file-name
Gerd Moellmann <gerd@gnu.org>
parents: 21365
diff changeset
157 (let* ((fl (expand-file-name filenm dir)) mnt
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158 (timest (format-time-string "%Y-%m-%d %a %T %Z"
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159 (elt (file-attributes fl) 5))))
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160 (set-buffer gulp-tmp-buffer)
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161 (erase-buffer)
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162 (insert-file-contents fl nil 0 gulp-max-len)
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163 (goto-char 1)
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 (if (re-search-forward gulp-discard nil t)
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 (setq mnt nil) ;; do nothing, return nil
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166 (goto-char 1)
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167 (if (and (re-search-forward "^;+ *Maintainer: \\(.*\\)$" nil t)
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168 (> (length (setq mnt (match-string 1))) 0))
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 () ;; found!
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170 (goto-char 1)
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171 (if (re-search-forward "^;+ *Author: \\(.*\\)$" nil t)
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172 (setq mnt (match-string 1))))
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173 (if (= (length mnt) 0) (setq mnt nil))) ;; "^;; Author: $" --> nil
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 (cons mnt timest))))
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175
48341
595c4a350a47 Add provide call.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 38412
diff changeset
176 (provide 'gulp)
595c4a350a47 Add provide call.
Markus Rost <rost@math.uni-bielefeld.de>
parents: 38412
diff changeset
177
93975
1e3a407766b9 Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 87649
diff changeset
178 ;; arch-tag: 42750a11-460a-4efc-829f-342d075530e5
15178
c23003387bc9 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179 ;;; gulp.el ends here