Gnus -- minor build / warning fixes
authorSteve Youngs <steve@sxemacs.org>
Mon, 9 Mar 2020 06:04:31 +0000 (16:04 +1000)
committerSteve Youngs <steve@sxemacs.org>
Mon, 9 Mar 2020 06:04:31 +0000 (16:04 +1000)
Just a swag of compiler warning fixes.  Can't send them upstream because I
use a number of (S)XEmacs-only techniques (if-boundp, with-boundp, etc)

* xemacs-packages/gnus/lisp/nnmail.el: Use
#'globally-declare-boundp to avoid a warning.

* xemacs-packages/gnus/lisp/mm-decode.el (mm-pipe-part):
#'with-boundp 'name' to avoid warning.

* xemacs-packages/gnus/lisp/gnus-xmas.el:
#'globally-declare-boundp a mass of vars to avoid warnings. A
little lazy, I admit.  Sorry.

* xemacs-packages/gnus/lisp/mail-source.el: Ditto.

* xemacs-packages/gnus/lisp/gnus-util.el
(gnus-iswitchb-completing-read): Use #'with-boundp to avoid
warnings.
(gnus-rename-file): Remove unused 'old-name', 'new-name'.

* xemacs-packages/gnus/lisp/gnus-start.el (gnus-read-init-file):
Use 'load-user-init-file-p' instead of 'init-file-user'.
(gnus-get-unread-articles): #'with-boundp to avoid a truck load of
warnings.

* xemacs-packages/gnus/lisp/gnus-salt.el
(gnus-tree-highlight-node): Use #'with-boundp to avoid warnings
coming out of #'gnus--let-eval macro.

* xemacs-packages/gnus/lisp/gnus-range.el (gnus-range-difference):
Remove unused 'safe'.

* xemacs-packages/gnus/lisp/gnus-cite.el (gnus-cite-face-list):
Use #'if-boundp to kill off warnings.
(gnus-message-citation-mode): Remove unused 'keywords'.

* xemacs-packages/gnus/lisp/gnus-agent.el (gnus-agent-batch): Wrap
use of 'init-file-user' in #'with-obsolete-variable

Signed-off-by: Steve Youngs <steve@sxemacs.org>
xemacs-packages/gnus/lisp/gnus-agent.el
xemacs-packages/gnus/lisp/gnus-cite.el
xemacs-packages/gnus/lisp/gnus-range.el
xemacs-packages/gnus/lisp/gnus-salt.el
xemacs-packages/gnus/lisp/gnus-start.el
xemacs-packages/gnus/lisp/gnus-util.el
xemacs-packages/gnus/lisp/gnus-xmas.el
xemacs-packages/gnus/lisp/mail-source.el
xemacs-packages/gnus/lisp/mm-decode.el
xemacs-packages/gnus/lisp/nnmail.el

index 9219ce0..f662e87 100644 (file)
@@ -3622,9 +3622,11 @@ articles in every agentized group? "))
 (defun gnus-agent-batch ()
   "Start Gnus, send queue and fetch session."
   (interactive)
-  (let ((init-file-user "")
-       (gnus-always-read-dribble-file t))
-    (gnus))
+  ;; Not for upstream --SY
+  (with-obsolete-variable 'init-file-user
+    (let ((init-file-user "")
+         (gnus-always-read-dribble-file t))
+      (gnus)))
   (let ((gnus-agent-confirmation-function 'gnus-agent-batch-confirmation))
     (gnus-group-send-queue)
     (gnus-agent-fetch-session)))
index 502a3be..52af07b 100644 (file)
@@ -317,9 +317,9 @@ This should make it easier to see who wrote what."
   :set (lambda (symbol value)
         (prog1
             (custom-set-default symbol value)
-          (if (boundp 'gnus-message-max-citation-depth)
+          (if-boundp 'gnus-message-max-citation-depth
               (setq gnus-message-max-citation-depth (length value)))
-          (if (boundp 'gnus-message-citation-keywords)
+          (if-boundp 'gnus-message-citation-keywords
               (setq gnus-message-citation-keywords
                     `((gnus-message-search-citation-line
                        ,@(let ((list nil)
@@ -1209,7 +1209,7 @@ When enabled, it automatically turns on `font-lock-mode'."
     (let ((defaults (car (if (featurep 'xemacs)
                             (get 'message-mode 'font-lock-defaults)
                           font-lock-defaults)))
-         default keywords)
+         default)
       (while defaults
        (setq default (if (consp defaults)
                          (pop defaults)
index 5cc8367..47a5daa 100644 (file)
@@ -96,8 +96,8 @@ Both ranges must be in ascending order."
   (setq range1 (gnus-range-normalize range1))
   (setq range2 (gnus-range-normalize range2))
   (let* ((new-range (cons nil (copy-sequence range1)))
-         (r new-range)
-         (safe t))
+         (r new-range))
+         ;; (safe t)) this isn't used? --SY.
     (while (cdr r)
       (let* ((r1 (cadr r))
              (r2 (car range2))
index e4a8dbe..5fcd4a5 100644 (file)
@@ -667,20 +667,24 @@ it in the environment specified by BINDINGS."
        face)
     (with-current-buffer gnus-summary-buffer
       (let ((uncached (memq article gnus-newsgroup-undownloaded)))
-        (gnus--let-eval
-            ((score (or (cdr (assq article gnus-newsgroup-scored))
-                       gnus-summary-default-score 0))
-            (default gnus-summary-default-score)
-            (default-high gnus-summary-default-high-score)
-            (default-low gnus-summary-default-low-score)
-             (uncached uncached)
-             (downloaded (not uncached))
-            (mark (or (gnus-summary-article-mark article) gnus-unread-mark)))
-            evalfun
-          ;; Eval the cars of the lists until we find a match.
-          (while (and list
-                      (not (funcall evalfun (caar list))))
-            (setq list (cdr list))))))
+       ;; #'gnus--let-eval is certainly a funky macro, but man I hate
+       ;; compiler warnings. (not for upstream) --SY.
+       (with-boundp '(score default default-high default-low uncached
+                            downloaded mark)
+         (gnus--let-eval
+          ((score (or (cdr (assq article gnus-newsgroup-scored))
+                      gnus-summary-default-score 0))
+           (default gnus-summary-default-score)
+           (default-high gnus-summary-default-high-score)
+           (default-low gnus-summary-default-low-score)
+           (uncached uncached)
+           (downloaded (not uncached))
+           (mark (or (gnus-summary-article-mark article) gnus-unread-mark)))
+          evalfun
+          ;; Eval the cars of the lists until we find a match.
+          (while (and list
+                      (not (funcall evalfun (caar list))))
+            (setq list (cdr list)))))))
     (unless (eq (setq face (cdar list)) (gnus-get-text-property-excluding-characters-with-faces beg 'face))
       (gnus-put-text-property-excluding-characters-with-faces
        beg end 'face
index 52a53a7..952f997 100644 (file)
@@ -75,6 +75,7 @@ If a file with the `.el' or `.elc' suffixes exists, it will be read instead."
   :group 'gnus-start
   :type 'file)
 
+(defvar installation-directory)
 (defcustom gnus-site-init-file
   (condition-case nil
       (concat (file-name-directory
@@ -499,7 +500,12 @@ Can be used to turn version control on or off."
 (defvar gnus-init-inhibit nil)
 (defun gnus-read-init-file (&optional inhibit-next)
   ;; Don't load .gnus if the -q option was used.
-  (when init-file-user
+  ;;;
+  ;; GNU uses 'init-file-user' here which is obsolete in S(X)Emacs.
+  ;; Lars just went to the effort of ripping out all the XE-compat
+  ;; code so I doubt he'd want any back so I'm not going to bother
+  ;; with conditioning this. --SY.
+  (when load-user-init-file-p
     (if gnus-init-inhibit
        (setq gnus-init-inhibit nil)
       (setq gnus-init-inhibit inhibit-next)
@@ -1618,169 +1624,170 @@ backend check whether the group actually exists."
 (defun gnus-get-unread-articles (&optional level dont-connect one-level)
   (setq gnus-server-method-cache nil)
   (require 'gnus-agent)
-  (let* ((newsrc (cdr gnus-newsrc-alist))
-        (alevel (or level gnus-activate-level (1+ gnus-level-subscribed)))
-        (foreign-level
-         (or
-          level
-          (min
-           (cond ((and gnus-activate-foreign-newsgroups
-                       (not (numberp gnus-activate-foreign-newsgroups)))
-                  (1+ gnus-level-subscribed))
-                 ((numberp gnus-activate-foreign-newsgroups)
-                  gnus-activate-foreign-newsgroups)
-                 (t 0))
-           alevel)))
-        (methods-cache nil)
-        (type-cache nil)
-        (gnus-agent-article-local-times 0)
-        (archive-method (gnus-server-to-method "archive"))
-        infos info group active method cmethod
-        method-type method-group-list entry)
-    (gnus-message 6 "Checking new news...")
-
-    (while newsrc
-      (setq active (gnus-active (setq group (gnus-info-group
-                                            (setq info (pop newsrc))))))
-      ;; First go through all the groups, see what select methods they
-      ;; belong to, and then collect them into lists per unique select
-      ;; method.
-      (if (not (setq method (gnus-info-method info)))
-         (setq method gnus-select-method)
-       ;; There may be several similar methods.  Possibly extend the
+  (with-boundp '(dummy method-type infos gnus-agent-article-local-times)
+    (let* ((newsrc (cdr gnus-newsrc-alist))
+          (alevel (or level gnus-activate-level (1+ gnus-level-subscribed)))
+          (foreign-level
+           (or
+            level
+            (min
+             (cond ((and gnus-activate-foreign-newsgroups
+                         (not (numberp gnus-activate-foreign-newsgroups)))
+                    (1+ gnus-level-subscribed))
+                   ((numberp gnus-activate-foreign-newsgroups)
+                    gnus-activate-foreign-newsgroups)
+                   (t 0))
+             alevel)))
+          (methods-cache nil)
+          (type-cache nil)
+          (gnus-agent-article-local-times 0)
+          (archive-method (gnus-server-to-method "archive"))
+          infos info group active method cmethod
+          method-type method-group-list entry)
+      (gnus-message 6 "Checking new news...")
+
+      (while newsrc
+       (setq active (gnus-active (setq group (gnus-info-group
+                                              (setq info (pop newsrc))))))
+       ;; First go through all the groups, see what select methods they
+       ;; belong to, and then collect them into lists per unique select
        ;; method.
-       (if (setq cmethod (assoc method methods-cache))
-           (setq method (cdr cmethod))
-         (setq cmethod (if (stringp method)
-                           (gnus-server-to-method method)
-                         (inline (gnus-find-method-for-group
-                                  (gnus-info-group info) info))))
-         (push (cons method cmethod) methods-cache)
-         (setq method cmethod)))
-      (setq method-group-list (assoc method type-cache))
-      (unless method-group-list
-       (setq method-type
-             (cond
-              ((or (gnus-secondary-method-p method)
-                   (and (gnus-archive-server-wanted-p)
-                        (gnus-methods-equal-p archive-method method)))
-               'secondary)
-              ((inline (gnus-server-equal gnus-select-method method))
-               'primary)
-              (t
-               'foreign)))
-       (push (setq method-group-list (list method method-type nil nil))
-             type-cache))
-      ;; Only add groups that need updating.
-      (if (funcall (if one-level #'= #'<=) (gnus-info-level info)
-             (if (eq (cadr method-group-list) 'foreign)
-                 foreign-level
-               alevel))
-         (setcar (nthcdr 2 method-group-list)
-                 (cons info (nth 2 method-group-list)))
-       ;; The group is inactive, so we nix out the number of unread articles.
-       ;; It leads `(gnus-group-unread group)' to return t.  See also
-       ;; `gnus-group-prepare-flat'.
-       (unless active
-         (when (setq entry (gnus-group-entry group))
-           (setcar entry t)))))
-
-    ;; Sort the methods based so that the primary and secondary
-    ;; methods come first.  This is done for legacy reasons to try to
-    ;; ensure that side-effect behavior doesn't change from previous
-    ;; Gnus versions.
-    (setq type-cache
-         (sort (nreverse type-cache)
-               (lambda (c1 c2)
-                 (< (gnus-method-rank (cadr c1) (car c1))
-                    (gnus-method-rank (cadr c2) (car c2))))))
-    ;; Go through the list of servers and possibly extend methods that
-    ;; aren't equal (and that need extension; i.e., they are async).
-    (let ((methods nil))
+       (if (not (setq method (gnus-info-method info)))
+           (setq method gnus-select-method)
+         ;; There may be several similar methods.  Possibly extend the
+         ;; method.
+         (if (setq cmethod (assoc method methods-cache))
+             (setq method (cdr cmethod))
+           (setq cmethod (if (stringp method)
+                             (gnus-server-to-method method)
+                           (inline (gnus-find-method-for-group
+                                    (gnus-info-group info) info))))
+           (push (cons method cmethod) methods-cache)
+           (setq method cmethod)))
+       (setq method-group-list (assoc method type-cache))
+       (unless method-group-list
+         (setq method-type
+               (cond
+                ((or (gnus-secondary-method-p method)
+                     (and (gnus-archive-server-wanted-p)
+                          (gnus-methods-equal-p archive-method method)))
+                 'secondary)
+                ((inline (gnus-server-equal gnus-select-method method))
+                 'primary)
+                (t
+                 'foreign)))
+         (push (setq method-group-list (list method method-type nil nil))
+               type-cache))
+       ;; Only add groups that need updating.
+       (if (funcall (if one-level #'= #'<=) (gnus-info-level info)
+                    (if (eq (cadr method-group-list) 'foreign)
+                        foreign-level
+                      alevel))
+           (setcar (nthcdr 2 method-group-list)
+                   (cons info (nth 2 method-group-list)))
+         ;; The group is inactive, so we nix out the number of unread articles.
+         ;; It leads `(gnus-group-unread group)' to return t.  See also
+         ;; `gnus-group-prepare-flat'.
+         (unless active
+           (when (setq entry (gnus-group-entry group))
+             (setcar entry t)))))
+
+      ;; Sort the methods based so that the primary and secondary
+      ;; methods come first.  This is done for legacy reasons to try to
+      ;; ensure that side-effect behavior doesn't change from previous
+      ;; Gnus versions.
+      (setq type-cache
+           (sort (nreverse type-cache)
+                 (lambda (c1 c2)
+                   (< (gnus-method-rank (cadr c1) (car c1))
+                      (gnus-method-rank (cadr c2) (car c2))))))
+      ;; Go through the list of servers and possibly extend methods that
+      ;; aren't equal (and that need extension; i.e., they are async).
+      (let ((methods nil))
+       (dolist (elem type-cache)
+         (destructuring-bind (method method-type infos dummy) elem
+           (let ((gnus-opened-servers methods))
+             (when (and (gnus-similar-server-opened method)
+                        (gnus-check-backend-function
+                         'retrieve-group-data-early (car method)))
+               (setq method (gnus-server-extend-method
+                             (gnus-info-group (car infos))
+                             method))
+               (setcar elem method))
+             (push (list method 'ok) methods)))))
+
+      ;; If we have primary/secondary select methods, but no groups from
+      ;; them, we still want to issue a retrieval request from them.
+      (unless dont-connect
+       (dolist (method (cons gnus-select-method
+                             gnus-secondary-select-methods))
+         (when (and (not (assoc method type-cache))
+                    (gnus-check-backend-function 'request-list (car method)))
+           (with-current-buffer nntp-server-buffer
+             (gnus-read-active-file-1 method nil)))))
+
+      ;; Clear out all the early methods.
       (dolist (elem type-cache)
        (destructuring-bind (method method-type infos dummy) elem
-         (let ((gnus-opened-servers methods))
-           (when (and (gnus-similar-server-opened method)
+         (when (and method
+                    infos
+                    (gnus-check-backend-function
+                     'retrieve-group-data-early (car method))
+                    (not (gnus-method-denied-p method)))
+           (when (ignore-errors (gnus-get-function method 'open-server))
+             (unless (gnus-server-opened method)
+               (gnus-open-server method))
+             (when (gnus-server-opened method)
+               ;; Just mark this server as "cleared".
+               (gnus-retrieve-group-data-early method nil))))))
+
+      ;; Start early async retrieval of data.
+      (let ((done-methods nil)
+           sanity-spec)
+       (dolist (elem type-cache)
+         (destructuring-bind (method method-type infos dummy) elem
+           (setq sanity-spec (list (car method) (cadr method)))
+           (when (and method infos
+                      (not (gnus-method-denied-p method)))
+             ;; If the open-server method doesn't exist, then the method
+             ;; itself doesn't exist, so we ignore it.
+             (if (not (ignore-errors (gnus-get-function method 'open-server)))
+                 (setq type-cache (delq elem type-cache))
+               (unless (gnus-server-opened method)
+                 (gnus-open-server method))
+               (when (and
+                      ;; This is a sanity check, so that we never
+                      ;; attempt to start two async requests to the
+                      ;; same server, because that will fail.  This
+                      ;; should never happen, since the methods should
+                      ;; be unique at this point, but apparently it
+                      ;; does happen in the wild with some setups.
+                      (not (member sanity-spec done-methods))
+                      (gnus-server-opened method)
                       (gnus-check-backend-function
                        'retrieve-group-data-early (car method)))
-             (setq method (gnus-server-extend-method
-                           (gnus-info-group (car infos))
-                           method))
-             (setcar elem method))
-           (push (list method 'ok) methods)))))
-
-    ;; If we have primary/secondary select methods, but no groups from
-    ;; them, we still want to issue a retrieval request from them.
-    (unless dont-connect
-      (dolist (method (cons gnus-select-method
-                           gnus-secondary-select-methods))
-       (when (and (not (assoc method type-cache))
-                  (gnus-check-backend-function 'request-list (car method)))
-         (with-current-buffer nntp-server-buffer
-           (gnus-read-active-file-1 method nil)))))
-
-    ;; Clear out all the early methods.
-    (dolist (elem type-cache)
-      (destructuring-bind (method method-type infos dummy) elem
-       (when (and method
-                  infos
-                  (gnus-check-backend-function
-                   'retrieve-group-data-early (car method))
-                  (not (gnus-method-denied-p method)))
-         (when (ignore-errors (gnus-get-function method 'open-server))
-           (unless (gnus-server-opened method)
-             (gnus-open-server method))
-           (when (gnus-server-opened method)
-             ;; Just mark this server as "cleared".
-             (gnus-retrieve-group-data-early method nil))))))
-
-    ;; Start early async retrieval of data.
-    (let ((done-methods nil)
-         sanity-spec)
+                 (push sanity-spec done-methods)
+                 (when (gnus-check-backend-function 'request-scan (car method))
+                   (gnus-request-scan nil method))
+                 ;; Store the token we get back from -early so that we
+                 ;; can pass it to -finish later.
+                 (setcar (nthcdr 3 elem)
+                         (gnus-retrieve-group-data-early method infos))))))))
+
+      ;; Do the rest of the retrieval.
       (dolist (elem type-cache)
-       (destructuring-bind (method method-type infos dummy) elem
-         (setq sanity-spec (list (car method) (cadr method)))
+       (destructuring-bind (method method-type infos early-data) elem
          (when (and method infos
                     (not (gnus-method-denied-p method)))
-           ;; If the open-server method doesn't exist, then the method
-           ;; itself doesn't exist, so we ignore it.
-           (if (not (ignore-errors (gnus-get-function method 'open-server)))
-               (setq type-cache (delq elem type-cache))
-             (unless (gnus-server-opened method)
-               (gnus-open-server method))
-             (when (and
-                    ;; This is a sanity check, so that we never
-                    ;; attempt to start two async requests to the
-                    ;; same server, because that will fail.  This
-                    ;; should never happen, since the methods should
-                    ;; be unique at this point, but apparently it
-                    ;; does happen in the wild with some setups.
-                    (not (member sanity-spec done-methods))
-                    (gnus-server-opened method)
-                    (gnus-check-backend-function
-                     'retrieve-group-data-early (car method)))
-               (push sanity-spec done-methods)
-               (when (gnus-check-backend-function 'request-scan (car method))
-                 (gnus-request-scan nil method))
-               ;; Store the token we get back from -early so that we
-               ;; can pass it to -finish later.
-               (setcar (nthcdr 3 elem)
-                       (gnus-retrieve-group-data-early method infos))))))))
-
-    ;; Do the rest of the retrieval.
-    (dolist (elem type-cache)
-      (destructuring-bind (method method-type infos early-data) elem
-       (when (and method infos
-                  (not (gnus-method-denied-p method)))
-         (let ((updatep (gnus-check-backend-function
-                         'request-update-info (car method))))
-           ;; See if any of the groups from this method require updating.
-           (gnus-read-active-for-groups method infos early-data)
-           (dolist (info infos)
-             (inline (gnus-get-unread-articles-in-group
-                      info (gnus-active (gnus-info-group info))
-                      updatep)))))))
-    (gnus-message 6 "Checking new news...done")))
+           (let ((updatep (gnus-check-backend-function
+                           'request-update-info (car method))))
+             ;; See if any of the groups from this method require updating.
+             (gnus-read-active-for-groups method infos early-data)
+             (dolist (info infos)
+               (inline (gnus-get-unread-articles-in-group
+                        info (gnus-active (gnus-info-group info))
+                        updatep)))))))
+      (gnus-message 6 "Checking new news...done"))))
 
 (defun gnus-method-rank (type method)
   (cond
index 31645fc..e94983f 100644 (file)
@@ -1582,28 +1582,29 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
 (defvar iswitchb-mode)
 
 (defun gnus-iswitchb-completing-read (prompt collection &optional require-match
-                                            initial-input history def)
+                                            initial-input history def)
   "`iswitchb' based completing-read function."
   ;; Make sure iswitchb is loaded before we let-bind its variables.
   ;; If it is loaded inside the let, variables can become unbound afterwards.
   (require 'iswitchb)
-  (let ((iswitchb-make-buflist-hook
-         (lambda ()
-           (setq iswitchb-temp-buflist
-                 (let ((choices (append
-                                 (when initial-input (list initial-input))
-                                 (symbol-value history) collection))
-                       filtered-choices)
-                   (dolist (x choices)
-                     (setq filtered-choices (adjoin x filtered-choices)))
-                   (nreverse filtered-choices))))))
-    (unwind-protect
-        (progn
-          (or iswitchb-mode
-             (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup))
-          (iswitchb-read-buffer prompt def require-match))
-      (or iswitchb-mode
-         (remove-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)))))
+  (with-boundp 'iswitchb-make-buflist-hook
+    (let ((iswitchb-make-buflist-hook
+          (lambda ()
+            (setq iswitchb-temp-buflist
+                  (let ((choices (append
+                                  (when initial-input (list initial-input))
+                                  (symbol-value history) collection))
+                        filtered-choices)
+                    (dolist (x choices)
+                      (setq filtered-choices (adjoin x filtered-choices)))
+                    (nreverse filtered-choices))))))
+      (unwind-protect
+         (progn
+           (or iswitchb-mode
+               (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup))
+           (iswitchb-read-buffer prompt def require-match))
+       (or iswitchb-mode
+           (remove-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup))))))
 
 (defun gnus-graphic-display-p ()
   (if (featurep 'xemacs)
@@ -1837,9 +1838,7 @@ predicate on the elements."
 empty directories from OLD-PATH."
   (when (file-exists-p old-path)
     (let* ((old-dir (file-name-directory old-path))
-          (old-name (file-name-nondirectory old-path))
           (new-dir (file-name-directory new-path))
-          (new-name (file-name-nondirectory new-path))
           temp)
       (gnus-make-directory new-dir)
       (rename-file old-path new-path t)
index a84c138..56ff05b 100644 (file)
 
 ;;; Code:
 
+(globally-declare-boundp
+ '(gnus-article-mode-map gnus-article-send-map
+   gnus-article-current-summary gnus-pick-mode gnus-mouse-3
+   gnus-widget-button-keymap gnus-logo-colors gnus-newsgroup-name
+   gnus-mime-button-commands gnus-mime-security-button-commands))
+
 (eval-when-compile
   (autoload 'gnus-active "gnus" nil nil 'macro)
   (autoload 'gnus-group-entry "gnus" nil nil 'macro)
index f4a9e19..ec8b231 100644 (file)
 
 ;;; Code:
 
+(globally-declare-boundp
+ '(pop3-password pop3-maildrop pop3-mailhost pop3-port
+   pop3-authentication-scheme pop3-stream-type
+   pop3-leave-mail-on-server))
+
 (require 'format-spec)
 (eval-when-compile
   (require 'cl)
index 79fc74a..7cc8e1b 100644 (file)
@@ -1450,15 +1450,16 @@ text/\\(\\sw+\\)\\(?:;\\s-*charset=\\([^\"'>]+\\)\\)?[^>]*>" nil t)
 (defun mm-pipe-part (handle &optional cmd)
   "Pipe HANDLE to a process.
 Use CMD as the process."
-  (let ((name (mail-content-type-get (mm-handle-type handle) 'name))
-       (command (or cmd
-                    (gnus-read-shell-command
-                     "Shell command on MIME part: " mm-last-shell-command))))
-    (mm-with-unibyte-buffer
-      (mm-insert-part handle)
-      (mm-add-meta-html-tag handle)
-      (let ((coding-system-for-write 'binary))
-       (shell-command-on-region (point-min) (point-max) command nil)))))
+  (with-boundp 'name
+    (let ((name (mail-content-type-get (mm-handle-type handle) 'name))
+         (command (or cmd
+                      (gnus-read-shell-command
+                       "Shell command on MIME part: " mm-last-shell-command))))
+      (mm-with-unibyte-buffer
+       (mm-insert-part handle)
+       (mm-add-meta-html-tag handle)
+       (let ((coding-system-for-write 'binary))
+         (shell-command-on-region (point-min) (point-max) command nil))))))
 
 (autoload 'gnus-completing-read "gnus-util")
 
index 3d4178d..1a52147 100644 (file)
 
 ;;; Code:
 
+;; I have no idea at all as to where this 'path' variable is coming
+;; from, there is no mention of it anywhere in this file.  This is the
+;; only way I can think of to elimiate two "variable path bound but
+;; not referenced" warnings. The traditional Gnus-method of hiding
+;; such things via dgnushack/lpath does not work here. --SY.
+(globally-declare-boundp 'path)
+
 (eval-when-compile (require 'cl))
 
 (require 'gnus)                                ; for macro gnus-kill-buffer, at least