summaryrefslogtreecommitdiff
path: root/lisp/mh-e
diff options
context:
space:
mode:
authorMike Kupfer <mkupfer@alum.berkeley.edu>2022-07-17 11:23:48 -0700
committerMike Kupfer <mkupfer@alum.berkeley.edu>2022-07-24 11:30:12 -0700
commitbb0af6489a1ca0104636fe2d658916e8c5b54dfc (patch)
tree908fde50b5451d01516a33e17e862c4da50782a0 /lisp/mh-e
parent9ed5c39aad09571314097be91cb28e7504614421 (diff)
downloademacs-bb0af6489a1ca0104636fe2d658916e8c5b54dfc.tar.gz
emacs-bb0af6489a1ca0104636fe2d658916e8c5b54dfc.tar.bz2
emacs-bb0af6489a1ca0104636fe2d658916e8c5b54dfc.zip
* mh-mime.el (mh-mime-save-parts): Restore default-directory (SF#498)
Diffstat (limited to 'lisp/mh-e')
-rw-r--r--lisp/mh-e/mh-mime.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index b93f7d8c412..5eada03ba46 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 ()