[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master bb0af6489a 1/2: * mh-mime.el (mh-mime-save-parts): Restore defaul
From: |
Mike Kupfer |
Subject: |
master bb0af6489a 1/2: * mh-mime.el (mh-mime-save-parts): Restore default-directory (SF#498) |
Date: |
Sun, 24 Jul 2022 14:37:41 -0400 (EDT) |
branch: master
commit bb0af6489a1ca0104636fe2d658916e8c5b54dfc
Author: Mike Kupfer <mkupfer@alum.berkeley.edu>
Commit: Mike Kupfer <mkupfer@alum.berkeley.edu>
* mh-mime.el (mh-mime-save-parts): Restore default-directory (SF#498)
---
lisp/mh-e/mh-mime.el | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index b93f7d8c41..5eada03ba4 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -394,18 +394,19 @@ do the work."
(if (equal nil mh-mime-save-parts-default-directory)
(setq mh-mime-save-parts-directory directory))
(with-current-buffer (get-buffer-create mh-log-buffer)
- (cd directory)
- (setq mh-mime-save-parts-directory directory)
- (let ((initial-size (mh-truncate-log-buffer)))
- (apply #'call-process
- (expand-file-name command mh-progs) nil t nil
- (mh-list-to-string (list folder msg "-auto"
- (if (not (mh-variant-p 'nmh))
- "-store"))))
- (if (> (buffer-size) initial-size)
- (save-window-excursion
- (switch-to-buffer-other-window mh-log-buffer)
- (sit-for 3))))))))
+ (let (default-directory)
+ (cd directory)
+ (setq mh-mime-save-parts-directory directory)
+ (let ((initial-size (mh-truncate-log-buffer)))
+ (apply #'call-process
+ (expand-file-name command mh-progs) nil t nil
+ (mh-list-to-string (list folder msg "-auto"
+ (if (not (mh-variant-p 'nmh))
+ "-store"))))
+ (if (> (buffer-size) initial-size)
+ (save-window-excursion
+ (switch-to-buffer-other-window mh-log-buffer)
+ (sit-for 3)))))))))
;;;###mh-autoload
(defun mh-toggle-mh-decode-mime-flag ()