]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/gulp.el
(function*, case, ecase, typecase, etypecase, progv, lexical-let, lexical-let*,
[gnu-emacs] / lisp / emacs-lisp / gulp.el
index 259085b44d70125a23d98da44eef9e257c82d3be..589be6fb771bf725d267cc16694be24d0b3192bf 100644 (file)
@@ -1,4 +1,4 @@
-;;; gulp.el --- Ask for updates for Lisp packages
+;;; gulp.el --- ask for updates for Lisp packages
 
 ;; Copyright (C) 1996 Free Software Foundation, Inc.
 
@@ -19,8 +19,9 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
 
 ;; update.
 
 ;;; Code:
-
-(defvar gulp-discard "^;+ *Maintainer: *FSF *$"
-  "*The regexp matching the packages not requiring the request for updates.")
-
-(defvar gulp-tmp-buffer "*gulp*" "The name of the temporary buffer.")
-
-(defvar gulp-max-len 2000
-  "*Distance into a Lisp source file to scan for keywords.")
-
-(defvar gulp-request-header
+(defgroup gulp nil
+  "Ask for updates for Lisp packages."
+  :prefix "-"
+  :group 'maint)
+
+(defcustom gulp-discard "^;+ *Maintainer: *FSF *$"
+  "*The regexp matching the packages not requiring the request for updates."
+  :type 'regexp
+  :group 'gulp)
+
+(defcustom gulp-tmp-buffer "*gulp*" "The name of the temporary buffer."
+  :type 'string
+  :group 'gulp)
+
+(defcustom gulp-max-len 2000
+  "*Distance into a Lisp source file to scan for keywords."
+  :type 'integer
+  :group 'gulp)
+
+(defcustom gulp-request-header
   (concat
    "This message was created automatically.
-A new version of GNU Emacs, "
-   (format "%d.%d" emacs-major-version (+ emacs-minor-version 1))
-   ", is entering the pretest state,
-and it is high time to submit the updates to the various emacs packages.
+I'm going to start pretesting a new version of GNU Emacs soon, so I'd
+like to ask if you have any updates for the Emacs packages you work on.
 You're listed as the maintainer of the following package(s):\n\n")
-  "*The starting text of a gulp message.")
+  "*The starting text of a gulp message."
+  :type 'string
+  :group 'gulp)
 
-(defvar gulp-request-end
+(defcustom gulp-request-end
   (concat
    "\nIf you have any changes since the version in the previous release ("
    (format "%d.%d" emacs-major-version emacs-minor-version)
    "),
 please send them to me ASAP.
 
+Please don't send the whole file.  Instead, please send a patch made with
+`diff -c' that shows precisely the changes you would like me to install.
+Also please include itemized change log entries for your changes;
+please use lisp/ChangeLog as a guide for the style and for what kinds
+of information to include.
+
 Thanks.")
-  "*The closing text in a gulp message.")
+  "*The closing text in a gulp message."
+  :type 'string
+  :group 'gulp)
 
 (defun gulp-send-requests (dir &optional time)
   "Send requests for updates to the authors of Lisp packages in directory DIR.
@@ -77,15 +96,20 @@ is left in the `*gulp*' buffer at the end."
          ;; Temporarily inhibit undo in the *gulp* buffer.
          (buffer-undo-list t)
          mail-setup-hook msg node)
+      (setq m-p-alist
+           (sort m-p-alist
+                 (function (lambda (a b)
+                             (string< (car a) (car b))))))
       (while (setq node (car m-p-alist))
        (setq msg (gulp-create-message (cdr node) time))
        (setq mail-setup-hook
-             '(lambda () 
-                (mail-subject)
-                (insert "It's time for Emacs updates again")
-                (goto-char (point-max))
-                (insert msg)))
+             (lambda ()
+               (mail-subject)
+               (insert "It's time for Emacs updates again")
+               (goto-char (point-max))
+               (insert msg)))
        (mail nil (car node))
+       (goto-char (point-min))
        (if (y-or-n-p "Send? ") (mail-send)
          (kill-this-buffer)
          (set-buffer gulp-tmp-buffer)
@@ -110,7 +134,7 @@ is left in the `*gulp*' buffer at the end."
   "Create the maintainer/package alist for files in FLIST in DIR.
 That is a list of elements, each of the form (MAINTAINER PACKAGES...)."
   (save-excursion
-    (let (mplist filen node mnt-tm mnt tm)
+    (let (mplist filen node mnt-tm mnt tm fl-tm)
       (get-buffer-create gulp-tmp-buffer)
       (set-buffer gulp-tmp-buffer)
       (setq buffer-undo-list t)
@@ -121,7 +145,6 @@ That is a list of elements, each of the form (MAINTAINER PACKAGES...)."
                (setq mplist (cons (cons mnt (cons (cons filen tm) (cdr node)))
                                   (delete node mplist)))
              (setq mplist (cons (list mnt (cons filen (cdr fl-tm))) mplist))))
-       (message "%s -- %s" filen fl-tm)
        (setq flist (cdr flist)))
       (erase-buffer)
       mplist)))
@@ -129,7 +152,7 @@ That is a list of elements, each of the form (MAINTAINER PACKAGES...)."
 (defun gulp-maintainer (filenm dir)
   "Return a list (MAINTAINER TIMESTAMP) for the package FILENM in directory DIR."
   (save-excursion
-    (let* ((fl (concat dir filenm)) mnt
+    (let* ((fl (expand-file-name filenm dir)) mnt
           (timest (format-time-string "%Y-%m-%d %a %T %Z"
                                       (elt (file-attributes fl) 5))))
       (set-buffer gulp-tmp-buffer)
@@ -148,4 +171,7 @@ That is a list of elements, each of the form (MAINTAINER PACKAGES...)."
        (if (= (length mnt) 0) (setq mnt nil))) ;; "^;; Author: $" --> nil
       (cons mnt timest))))
 
+(provide 'gulp)
+
+;;; arch-tag: 42750a11-460a-4efc-829f-342d075530e5
 ;;; gulp.el ends here