From b5118e0ae531da4bc6a7444e1b67f16c6a9579f0 Mon Sep 17 00:00:00 2001 From: Jeffrey C Honig Date: Tue, 27 Dec 2011 20:46:43 -0500 Subject: [PATCH] (mh-inc-folder): Call mh-process-or-undo-commands before running to insure we do not lose any pending changes. (closes SF #2321115). --- lisp/mh-e/ChangeLog | 6 ++++++ lisp/mh-e/mh-folder.el | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 60d1a4c6f5d..9682adcdddb 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,9 @@ +2011-12-28 Jeffrey C Honig + + * mh-folder.el (mh-inc-folder): Call mh-process-or-undo-commands + before running to insure we do not lose any pending changes. + (closes SF #2321115). + 2011-12-27 Ted Phelps Postpone junk processing (closes SF #2945712). Patch submitted by Ted Phelps and refined by Bill Wohler. diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index 878e3be3d1b..1960a93ab99 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el @@ -774,7 +774,7 @@ the message." return-value)) ;;;###mh-autoload -(defun mh-inc-folder (&optional file folder) +(defun mh-inc-folder (&optional file folder dont-exec-pending) "Incorporate new mail into a folder. You can incorporate mail from any file into the current folder by @@ -785,7 +785,10 @@ The hook `mh-inc-folder-hook' is run after incorporating new mail. Do not call this function from outside MH-E; use \\[mh-rmail] -instead." +instead. + +In a program, the processing of outstanding commands is not performed +if DONT-EXEC-PENDING is non-nil." (interactive (list (if current-prefix-arg (expand-file-name (read-file-name "inc mail from file: " @@ -794,6 +797,8 @@ instead." (mh-prompt-for-folder "inc mail into" mh-inbox t)))) (if (not folder) (setq folder mh-inbox)) + (unless dont-exec-pending + (mh-process-or-undo-commands folder)) (let ((threading-needed-flag nil)) (let ((config (current-window-configuration))) (when (and mh-show-buffer (get-buffer mh-show-buffer)) -- 2.39.5