]> git.eshelyaron.com Git - emacs.git/commitdiff
(mh-inc-folder): Call mh-process-or-undo-commands
authorJeffrey C Honig <jch@honig.net>
Wed, 28 Dec 2011 01:46:43 +0000 (20:46 -0500)
committerJeffrey C Honig <jch@honig.net>
Wed, 28 Dec 2011 01:46:43 +0000 (20:46 -0500)
before running to insure we do not lose any pending changes.
(closes SF #2321115).

lisp/mh-e/ChangeLog
lisp/mh-e/mh-folder.el

index 60d1a4c6f5d213fcffb2337173a3b021e73fb978..9682adcdddba3861a5ba691d6320d63cc4909aaa 100644 (file)
@@ -1,3 +1,9 @@
+2011-12-28  Jeffrey C Honig  <jch@honig.net>
+
+       * 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  <phelps@gnusto.com>
        Postpone junk processing (closes SF #2945712). Patch submitted by
        Ted Phelps and refined by Bill Wohler.
index 878e3be3d1b3287488c344f035ef26569c60e0e2..1960a93ab99c118f522f3b9bd707beb6547f8ca4 100644 (file)
@@ -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))