Sync up with Pteruductyl Gnus v0.71
[elisp/gnus.git-] / lisp / gnus-uu.el
index 19929f3..7767663 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-uu.el --- extract (uu)encoded files in Gnus
-;; Copyright (C) 1985,86,87,93,94,95,96,97,98 Free Software Foundation, Inc.
+;; Copyright (C) 198,995,86,87,93,94,95,96,97,98 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Created: 2 Oct 1993
@@ -215,7 +215,10 @@ Note that this variable can be used in conjunction with the
 
 ;; Various variables users may set
 
-(defcustom gnus-uu-tmp-dir "/tmp/"
+(defcustom gnus-uu-tmp-dir
+  (cond ((fboundp 'temp-directory) (temp-directory))
+       ((boundp 'temporary-file-directory) temporary-file-directory)
+       ("/tmp/"))
   "*Variable saying where gnus-uu is to do its work.
 Default is \"/tmp/\"."
   :group 'gnus-extract
@@ -833,8 +836,9 @@ didn't work, and overwrite existing files.  Otherwise, ask each time."
              (eq in-state 'first-and-last))
          (progn
            (setq state (list 'begin))
-           (save-excursion (set-buffer (gnus-get-buffer-create "*gnus-uu-body*"))
-                           (erase-buffer))
+           (save-excursion
+             (set-buffer (gnus-get-buffer-create "*gnus-uu-body*"))
+             (erase-buffer))
            (save-excursion
              (set-buffer (gnus-get-buffer-create "*gnus-uu-pre*"))
              (erase-buffer)
@@ -1024,7 +1028,7 @@ didn't work, and overwrite existing files.  Otherwise, ask each time."
   ;; finally just replaces the next to last number with "[0-9]+".
   (save-excursion
     (set-buffer (gnus-get-buffer-create gnus-uu-output-buffer-name))
-    (buffer-disable-undo (current-buffer))
+    (buffer-disable-undo)
     (erase-buffer)
     (insert (regexp-quote string))
 
@@ -1124,7 +1128,7 @@ didn't work, and overwrite existing files.  Otherwise, ask each time."
        string)
     (save-excursion
       (set-buffer (gnus-get-buffer-create gnus-uu-output-buffer-name))
-      (buffer-disable-undo (current-buffer))
+      (buffer-disable-undo)
       (while string-list
        (erase-buffer)
        (insert (caar string-list))
@@ -1199,6 +1203,7 @@ didn't work, and overwrite existing files.  Otherwise, ask each time."
                                       &optional sloppy limit no-errors)
   (let ((state 'first)
        (gnus-asynchronous nil)
+       (gnus-inhibit-treatment t)
        has-been-begin article result-file result-files process-state
        gnus-summary-display-article-function
        gnus-article-display-hook gnus-article-prepare-hook
@@ -1806,7 +1811,9 @@ is t."
 
   (gnus-summary-post-news)
 
-  (use-local-map (copy-keymap (current-local-map)))
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map (current-local-map))
+    (use-local-map map))
   (local-set-key "\C-c\C-c" 'gnus-summary-edit-article-done)
   (local-set-key "\C-c\C-c" 'gnus-uu-post-news-inews)
   (local-set-key "\C-c\C-s" 'gnus-uu-post-news-inews)