;;; mh-folder.el --- MH-Folder mode
-;; Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
In a program, optional non-nil second argument NO-ERROR-IF-NO-MESSAGE
means return nil instead of signaling an error if message does not
-exist\; in this case, the cursor is positioned near where the message
+exist; in this case, the cursor is positioned near where the message
would have been. Non-nil third argument DONT-SHOW means not to show
the message."
(interactive "NGo to message: ")
return-value))
;;;###mh-autoload
-(defun mh-inc-folder (&optional file folder dont-exec-pending)
+(defun mh-inc-folder (&optional file folder)
"Incorporate new mail into a folder.
You can incorporate mail from any file into the current folder by
mail.
Do not call this function from outside MH-E; use \\[mh-rmail]
-instead.
-
-In a program, the processing of outstanding commands is not performed
-if DONT-EXEC-PENDING is non-nil."
+instead."
(interactive (list (if current-prefix-arg
(expand-file-name
(read-file-name "inc mail from file: "
(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))
nil))))
(mh-toggle-threads))
(beginning-of-line)
+ (when (mh-outstanding-commands-p)
+ (mh-notate-deleted-and-refiled))
(if (and mh-showing-mode (looking-at mh-scan-valid-regexp)) (mh-show))
(run-hooks 'mh-inc-folder-hook)))
"-width" (window-width)
folder range)
(goto-char scan-start)
- (cond ((looking-at "scan: no messages in")
- (keep-lines mh-scan-valid-regexp)) ; Flush random scan lines
- ((looking-at (if (mh-variant-p 'gnu-mh)
- "scan: message set .* does not exist"
- "scan: bad message list "))
- (keep-lines mh-scan-valid-regexp))
- ((looking-at "scan: ")) ; Keep error messages
+ (cond ((or (looking-at "scan: no messages in")
+ (looking-at "scan: message set .* does not exist")
+ (looking-at "scan: bad message list "))
+ (keep-lines mh-scan-valid-regexp)) ; flush common scan output
+ ((looking-at "scan: ")) ; keep unexpected error messages
(t
- (keep-lines mh-scan-valid-regexp))) ; Flush random scan lines
+ (keep-lines mh-scan-valid-regexp))) ; flush random scan output
(setq mh-seq-list (mh-read-folder-sequences folder nil))
(mh-notate-user-sequences)
(or update