Apply Dave Love's patches.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 12 Dec 1999 17:33:19 +0000 (17:33 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 12 Dec 1999 17:33:19 +0000 (17:33 +0000)
Change headers.

15 files changed:
lisp/ChangeLog
lisp/binhex.el
lisp/gnus-agent.el
lisp/gnus-art.el
lisp/gnus-cus.el
lisp/gnus-sum.el
lisp/mailcap.el
lisp/mm-util.el
lisp/mm-uu.el
lisp/mm-view.el
lisp/mml.el
lisp/nnheader.el
lisp/nnimap.el
lisp/rfc1843.el
lisp/uudecode.el

index 63cc0f9..f0f68cc 100644 (file)
@@ -1,3 +1,51 @@
+1999-12-12 12:27:03  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * mm-uu.el: Change headers.
+       * rfc1843.el: Ditto.
+       * uudecode.el: Ditto.
+
+1999-12-07  Dave Love  <fx@gnu.org>
+
+       * gnus-agent.el (gnus-category-edit-predicate)
+       (gnus-category-edit-score, gnus-category-edit-score): Expand setf
+       inside backquote to avoid it at runtime.
+
+1999-12-07  Dave Love  <fx@gnu.org>
+
+       * binhex.el: Require cl when compiling.
+
+1999-12-04  Dave Love  <fx@gnu.org>
+
+       * gnus-cus.el (gnus-group-parameters): Allow nil for banner.
+
+1999-12-04  Dave Love  <fx@gnu.org>
+
+       * mm-util.el (mm-delete-duplicates): New function.
+       (mm-write-region): Use it.
+
+       * mml.el (mml-minibuffer-read-type): Use mm-delete-duplicates.
+
+       * mailcap.el (mailcap-mime-types): Require mm-util.  Use
+       mm-delete-duplicates.
+
+       * imap.el (imap-open, imap-debug): Avoid mapc.
+
+       * nnvirtual.el (nnvirtual-create-mapping): Likewise.
+
+       * gnus-sum.el (gnus-summary-exit-no-update): Avoid copy-list.
+       (gnus-multi-decode-encoded-word-string): Avoid mapc.
+
+       * gnus-start.el (gnus-site-init-file): Avoid ignore-errors at
+       runtime.
+
+       * gnus.el (gnus-select-method): Likewise.
+
+       * nnheader.el (nnheader-nov-read-integer): Likewise.
+
+       * mm-view.el (mm-inline-message): Require cl when compiling.
+       Avoid ignore-errors at runtime.
+       (mm-inline-text): Avoid mapc.
+       
 1999-12-12 10:36:51  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-art.el (article-decode-charset): Widen is bad.
index 0c8f5d4..200d571 100644 (file)
@@ -1,14 +1,11 @@
 ;;; binhex.el -- elisp native binhex decode
-;; Copyright (c) 1998 by Shenghuo Zhu <zsh@cs.rochester.edu>
+;; Copyright (c) 1998 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Create Date: Oct 1, 1998
-;; $Revision: 5.7 $
-;; Time-stamp: <Tue Oct  6 23:48:38 EDT 1998 zsh>
-;; Keywords: binhex
+;; Keywords: binhex news
 
-;; This file is not part of GNU Emacs, but the same permissions
-;; apply.
+;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -29,6 +26,8 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
+
 (if (not (fboundp 'char-int))
     (fset 'char-int 'identity))
 
index 782f446..9cbe9d4 100644 (file)
@@ -1256,10 +1256,11 @@ The following commands are available:
   (let ((info (assq category gnus-category-alist)))
     (gnus-edit-form
      (cadr info) (format "Editing the predicate for category %s" category)
-     `(lambda (predicate)
-       (setf (cadr (assq ',category gnus-category-alist)) predicate)
-       (gnus-category-write)
-       (gnus-category-list)))))
+     (function
+      `(lambda (predicate)
+        (setcar (cdr (assq ',category gnus-category-alist)) predicate)
+        (gnus-category-write)
+        (gnus-category-list))))))
 
 (defun gnus-category-edit-score (category)
   "Edit the score expression for CATEGORY."
@@ -1268,10 +1269,11 @@ The following commands are available:
     (gnus-edit-form
      (caddr info)
      (format "Editing the score expression for category %s" category)
-     `(lambda (groups)
-       (setf (caddr (assq ',category gnus-category-alist)) groups)
-       (gnus-category-write)
-       (gnus-category-list)))))
+     (function
+      `(lambda (groups)
+        (setcar (cddr (assq ',category gnus-category-alist)) groups)
+        (gnus-category-write)
+        (gnus-category-list))))))
 
 (defun gnus-category-edit-groups (category)
   "Edit the group list for CATEGORY."
@@ -1279,10 +1281,11 @@ The following commands are available:
   (let ((info (assq category gnus-category-alist)))
     (gnus-edit-form
      (cadddr info) (format "Editing the group list for category %s" category)
-     `(lambda (groups)
-       (setf (cadddr (assq ',category gnus-category-alist)) groups)
-       (gnus-category-write)
-       (gnus-category-list)))))
+     (function
+      `(lambda (groups)
+        (setcar (nthcdr 3 (assq ',category gnus-category-alist)) groups)
+        (gnus-category-write)
+        (gnus-category-list))))))
 
 (defun gnus-category-kill (category)
   "Kill the current category."
index 8e40a20..1295224 100644 (file)
@@ -2091,12 +2091,12 @@ This format is defined by the `gnus-article-time-format' variable."
               (while (setq elem (pop alist))
                 (when (and name (string-match (car elem) name))
                   (setq alist nil
-                        highlight (copy-list (cdr elem)))))
+                        highlight (copy-sequence (cdr elem)))))
               highlight)
-            (copy-list highlight-words)
+            (copy-sequence highlight-words)
             (if gnus-newsgroup-name
-                (copy-list (gnus-group-find-parameter 
-                            gnus-newsgroup-name 'highlight-words t)))
+                (copy-sequence (gnus-group-find-parameter 
+                                gnus-newsgroup-name 'highlight-words t)))
             gnus-emphasis-alist)))))
 
 (defvar gnus-summary-article-menu)
@@ -4481,13 +4481,13 @@ For example:
               (eq gnus-newsgroup-name
                   (car gnus-decode-header-methods-cache)))
     (setq gnus-decode-header-methods-cache (list gnus-newsgroup-name))
-    (mapc '(lambda (x)
-            (if (symbolp x)
-                (nconc gnus-decode-header-methods-cache (list x))
-              (if (and gnus-newsgroup-name
-                       (string-match (car x) gnus-newsgroup-name))
-                  (nconc gnus-decode-header-methods-cache
-                         (list (cdr x))))))
+    (mapcar (lambda (x)
+             (if (symbolp x)
+                 (nconc gnus-decode-header-methods-cache (list x))
+               (if (and gnus-newsgroup-name
+                        (string-match (car x) gnus-newsgroup-name))
+                   (nconc gnus-decode-header-methods-cache
+                          (list (cdr x))))))
          gnus-decode-header-methods))
   (let ((xlist gnus-decode-header-methods-cache))
     (pop xlist)
index 2923d01..92baaca 100644 (file)
@@ -155,7 +155,8 @@ rules as described later).")
 
     (banner (choice :tag "Banner"
                    (const signature)
-                   string ) "\
+                   string
+                   (const :tag "None" nil)) "\
 Banner to be removed from articles.")
 
     (auto-expire (const :tag "Automatic Expire" t) "\
index 203fa54..639314c 100644 (file)
@@ -1117,13 +1117,13 @@ For example:
               (eq gnus-newsgroup-name
                   (car gnus-decode-encoded-word-methods-cache)))
     (setq gnus-decode-encoded-word-methods-cache (list gnus-newsgroup-name))
-    (mapc '(lambda (x)
-            (if (symbolp x)
-                (nconc gnus-decode-encoded-word-methods-cache (list x))
-              (if (and gnus-newsgroup-name
-                       (string-match (car x) gnus-newsgroup-name))
-                  (nconc gnus-decode-encoded-word-methods-cache
-                         (list (cdr x))))))
+    (mapcar (lambda (x)
+             (if (symbolp x)
+                 (nconc gnus-decode-encoded-word-methods-cache (list x))
+               (if (and gnus-newsgroup-name
+                        (string-match (car x) gnus-newsgroup-name))
+                   (nconc gnus-decode-encoded-word-methods-cache
+                          (list (cdr x))))))
          gnus-decode-encoded-word-methods))
   (let ((xlist gnus-decode-encoded-word-methods-cache))
     (pop xlist)
@@ -5409,7 +5409,7 @@ If FORCE (the prefix), also save the .newsrc file(s)."
       (gnus-async-halt-prefetch)
       (mapcar 'funcall
              (delq 'gnus-summary-expire-articles
-                   (copy-list gnus-summary-prepare-exit-hook)))
+                   (copy-sequence gnus-summary-prepare-exit-hook)))
       (when (gnus-buffer-live-p gnus-article-buffer)
        (save-excursion
          (set-buffer gnus-article-buffer)
index 9088f5b..8a15334 100644 (file)
@@ -28,6 +28,7 @@
 
 (eval-when-compile (require 'cl))
 (require 'mail-parse)
+(require 'mm-util)
 
 (defvar mailcap-parse-args-syntax-table
   (let ((table (copy-syntax-table emacs-lisp-mode-syntax-table)))
@@ -881,7 +882,7 @@ The path of COMMAND will be returned iff COMMAND is a command."
 
 (defun mailcap-mime-types ()
   "Return a list of MIME media types."
-  (delete-duplicates (mapcar 'cdr mailcap-mime-extensions)))
+  (mm-delete-duplicates (mapcar 'cdr mailcap-mime-extensions)))
 
 (provide 'mailcap)
 
index 265cb86..19f0557 100644 (file)
@@ -236,6 +236,15 @@ If the charset is `composition', return the actual one."
     ;; This is for XEmacs.
     (mm-mule-charset-to-mime-charset charset)))
 
+(defun mm-delete-duplicates (list)
+  "Simple  substitute for CL `delete-duplicates', testing with `equal'."
+  (let (result head)
+    (while list
+      (setq head (car list))
+      (setq list (delete head list))
+      (setq result (cons head result)))
+    (nreverse result)))
+
 (defun mm-find-mime-charset-region (b e)
   "Return the MIME charsets needed to encode the region between B and E."
   (let ((charsets (mapcar 'mm-mime-charset
@@ -243,7 +252,7 @@ If the charset is `composition', return the actual one."
                                (mm-find-charset-region b e)))))
     (when (memq 'iso-2022-jp-2 charsets)
       (setq charsets (delq 'iso-2022-jp charsets)))
-    (setq charsets (delete-duplicates charsets))
+    (setq charsets (mm-delete-duplicates charsets))
     (if (and (> (length charsets) 1)
             (fboundp 'find-coding-systems-region)
             (memq 'utf-8 (find-coding-systems-region b e)))
index 8034707..8a4b323 100644 (file)
@@ -1,10 +1,10 @@
 ;;; mm-uu.el -- Return uu stuffs as mm handles
-;; Copyright (c) 1998,99 by Shenghuo Zhu
+;; Copyright (c) 1998,99 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
-;; Keywords: postscript uudecode binhex shar forward
+;; Keywords: postscript uudecode binhex shar forward news
 
-;; This file is part of pgnus.
+;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
index 7680c46..6dcc35f 100644 (file)
@@ -23,6 +23,7 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
 (require 'mail-parse)
 (require 'mailcap)
 (require 'mm-bodies)
             `(lambda ()
                (let (buffer-read-only)
                  (if (functionp 'remove-specifier)
-                     (mapc (lambda (prop)
-                             (remove-specifier
-                              (face-property 'default prop) (current-buffer)))
-                           '(background background-pixmap foreground)))
+                     (mapcar (lambda (prop)
+                               (remove-specifier
+                                (face-property 'default prop)
+                                (current-buffer)))
+                             '(background background-pixmap foreground)))
                  (delete-region ,(point-min-marker)
                                 ,(point-max-marker)))))))))
      ((or (equal type "enriched")
         handle
         `(lambda ()
            (let (buffer-read-only)
-             (ignore-errors
-               ;; This is only valid on XEmacs.
-               (mapc (lambda (prop)
-                       (remove-specifier
-                        (face-property 'default prop) (current-buffer)))
-                     '(background background-pixmap foreground)))
+             (condition-case nil
+                 ;; This is only valid on XEmacs.
+                 (mapcar (lambda (prop)
+                           (remove-specifier
+                            (face-property 'default prop) (current-buffer)))
+                         '(background background-pixmap foreground))
+               (error nil))
              (delete-region ,(point-min-marker) ,(point-max-marker)))))))))
 
 (defun mm-display-patch-inline (handle)
index 2aac506..a5841c6 100644 (file)
@@ -617,7 +617,7 @@ one charsets.")
                  (format "Content type (default %s): " default)
                  (mapcar
                   'list
-                  (delete-duplicates
+                  (mm-delete-duplicates
                    (nconc
                     (mapcar (lambda (m) (cdr m))
                             mailcap-mime-extensions)
@@ -634,8 +634,7 @@ one charsets.")
                                        nil
                                      type)))
                                (cdr l))))
-                      mailcap-mime-data)))
-                   :test 'equal)))))
+                      mailcap-mime-data))))))))
     (if (not (equal string ""))
        string
       default)))
index 8c0b075..e4a11dd 100644 (file)
@@ -296,7 +296,9 @@ on your system, you could say something like:
   '(prog1
        (if (eq (char-after) ?\t)
           0
-        (let ((num (ignore-errors (read (current-buffer)))))
+        (let ((num (condition-case nil
+                       (read (current-buffer))
+                     (error nil))))
           (if (numberp num) num 0)))
      (or (eobp) (forward-char 1))))
 
index 59cd0ab..bcaf219 100644 (file)
@@ -775,19 +775,19 @@ function is generally only called when Gnus is shutting down."
                         seen))
            (gnus-info-set-read info seen)))
 
-       (mapc (lambda (pred)
-               (when (and (nnimap-mark-permanent-p (cdr pred))
-                          (member (nnimap-mark-to-flag (cdr pred))
-                                  (imap-mailbox-get 'flags)))
-                 (gnus-info-set-marks
-                  info
-                  (nnimap-update-alist-soft
-                   (cdr pred)
-                   (gnus-compress-sequence
-                    (imap-search (nnimap-mark-to-predicate (cdr pred))))
-                   (gnus-info-marks info))
-                  t)))
-             gnus-article-mark-lists)
+       (mapcar (lambda (pred)
+                 (when (and (nnimap-mark-permanent-p (cdr pred))
+                            (member (nnimap-mark-to-flag (cdr pred))
+                                    (imap-mailbox-get 'flags)))
+                   (gnus-info-set-marks
+                    info
+                    (nnimap-update-alist-soft
+                     (cdr pred)
+                     (gnus-compress-sequence
+                      (imap-search (nnimap-mark-to-predicate (cdr pred))))
+                     (gnus-info-marks info))
+                    t)))
+               gnus-article-mark-lists)
        
        (gnus-message 5 "nnimap: Updating info for %s...done"
                      (gnus-info-group info))
@@ -1186,7 +1186,7 @@ sure of changing the value of `foo'."
 (when nnimap-debug
   (require 'trace)
   (buffer-disable-undo (get-buffer-create nnimap-debug))
-  (mapc (lambda (f) (trace-function-background f nnimap-debug))
+  (mapcar (lambda (f) (trace-function-background f nnimap-debug))
         '(
          nnimap-possibly-change-server
          nnimap-verify-uidvalidity
index fb59ede..f9f3888 100644 (file)
@@ -1,10 +1,10 @@
 ;;; rfc1843.el --- HZ (rfc1843) decoding
-;; Copyright (c) 1998,1999 by Shenghuo Zhu <zsh@cs.rochester.edu>
+;; Copyright (c) 1998,99 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
-;; Keywords: news HZ
+;; Keywords: news HZ HZ+
 
-;; This file is a part of GNU Emacs, but the same permissions apply.
+;; This file is a part of GNU Emacs.
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published
index 539260f..7b709e2 100644 (file)
@@ -1,12 +1,10 @@
 ;;; uudecode.el -- elisp native uudecode
-;; Copyright (c) 1998 by Shenghuo Zhu <zsh@cs.rochester.edu>
+;; Copyright (c) 1998,99 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
-;; $Revision: 5.7 $
-;; Keywords: uudecode
+;; Keywords: uudecode news
 
-;; This file is not part of GNU Emacs, but the same permissions
-;; apply.
+;; This file is a part of GNU Emacs.
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by