emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 60f045b 5/9: Remove some compat code from binhex.el and uudecode.


From: Lars Ingebrigtsen
Subject: master 60f045b 5/9: Remove some compat code from binhex.el and uudecode.el
Date: Tue, 18 Aug 2020 06:12:38 -0400 (EDT)

branch: master
commit 60f045b893e040e4723961c422a6af8b0406a1b2
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Remove some compat code from binhex.el and uudecode.el
    
    * lisp/mail/binhex.el (binhex-temporary-file-directory): Make obsolete.
    (binhex-decode-region-external): Adjust usage.
    
    * lisp/mail/uudecode.el (uudecode-temporary-file-directory): Make
    obsolete.
    (uudecode-decode-region-external): Adjust usage.
---
 lisp/mail/binhex.el   | 10 ++++------
 lisp/mail/uudecode.el | 10 +++-------
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/lisp/mail/binhex.el b/lisp/mail/binhex.el
index 896f82d..2c77f88 100644
--- a/lisp/mail/binhex.el
+++ b/lisp/mail/binhex.el
@@ -83,10 +83,8 @@ input and write the converted data to its standard output."
   "^[^:]...............................................................$")
 (defconst binhex-end-line ":$")                ; unused
 
-(defvar binhex-temporary-file-directory
-  (cond ((fboundp 'temp-directory) (temp-directory))
-       ((boundp 'temporary-file-directory) temporary-file-directory)
-       ("/tmp/")))
+(make-obsolete-variable 'binhex-temporary-file-directory
+                        'temporary-file-directory "28.1")
 
 (defun binhex-insert-char (char &optional count ignored buffer)
   "Insert COUNT copies of CHARACTER into BUFFER."
@@ -285,7 +283,7 @@ If HEADER-ONLY is non-nil only decode header and return 
filename."
        (file-name (expand-file-name
                    (concat (binhex-decode-region-internal start end t)
                            ".data")
-                   binhex-temporary-file-directory)))
+                   temporary-file-directory)))
     (save-excursion
       (goto-char start)
       (when (re-search-forward binhex-begin-line nil t)
@@ -296,7 +294,7 @@ If HEADER-ONLY is non-nil only decode header and return 
filename."
                                  (generate-new-buffer " *binhex-work*")))
                (buffer-disable-undo work-buffer)
                (insert-buffer-substring cbuf firstline end)
-               (cd binhex-temporary-file-directory)
+               (cd temporary-file-directory)
                (apply 'call-process-region
                       (point-min)
                       (point-max)
diff --git a/lisp/mail/uudecode.el b/lisp/mail/uudecode.el
index 68e1227..945bff3 100644
--- a/lisp/mail/uudecode.el
+++ b/lisp/mail/uudecode.el
@@ -61,10 +61,8 @@ input and write the converted data to its standard output."
       (setq str (concat str "[^a-z]")))
     (concat str ".?$")))
 
-(defvar uudecode-temporary-file-directory
-  (cond ((fboundp 'temp-directory) (temp-directory))
-       ((boundp 'temporary-file-directory) temporary-file-directory)
-       ("/tmp")))
+(make-obsolete-variable 'uudecode-temporary-file-directory
+                        'temporary-file-directory "28.1")
 
 ;;;###autoload
 (defun uudecode-decode-region-external (start end &optional file-name)
@@ -86,9 +84,7 @@ used is specified by `uudecode-decoder-program'."
                                               (match-string 1)))))
        (setq tempfile (if file-name
                           (expand-file-name file-name)
-                        (let ((temporary-file-directory
-                               uudecode-temporary-file-directory))
-                          (make-temp-file "uu"))))
+                        (make-temp-file "uu")))
        (let ((cdir default-directory)
              (default-process-coding-system nil))
          (unwind-protect



reply via email to

[Prev in Thread] Current Thread [Next in Thread]