diff options
author | Jeffrey C Honig <jch@honig.net> | 2011-12-27 20:46:43 -0500 |
---|---|---|
committer | Jeffrey C Honig <jch@honig.net> | 2011-12-27 20:46:43 -0500 |
commit | b5118e0ae531da4bc6a7444e1b67f16c6a9579f0 (patch) | |
tree | 5b5f7e335e3a4028b33a5bd54e621076a350b8d9 /lisp/mh-e | |
parent | 500f33fc9200e284ed52ada341eaccccebd2b1ac (diff) | |
download | emacs-b5118e0ae531da4bc6a7444e1b67f16c6a9579f0.tar.gz |
(mh-inc-folder): Call mh-process-or-undo-commands
before running to insure we do not lose any pending changes.
(closes SF #2321115).
Diffstat (limited to 'lisp/mh-e')
-rw-r--r-- | lisp/mh-e/ChangeLog | 6 | ||||
-rw-r--r-- | 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 <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. 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)) |