]> code.delx.au - gnu-emacs/blobdiff - lisp/mh-e/mh-folder.el
Remove compatibility with Emacs 24.3 in octave-mode
[gnu-emacs] / lisp / mh-e / mh-folder.el
index f3ea8003ed0ea552e481794ca81d4d530d38b5e7..e43aa1f52b5e2f77f9f2a309d8fb450c7bb38cb9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mh-folder.el --- MH-Folder mode
 
-;; Copyright (C) 2002-2003, 2005-2013 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>
@@ -755,7 +755,7 @@ You can enter the message NUMBER either before or after typing
 
 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: ")
@@ -774,7 +774,7 @@ the 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
@@ -785,10 +785,7 @@ 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.
-
-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: "
@@ -797,8 +794,6 @@ if DONT-EXEC-PENDING is non-nil."
                          (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))
@@ -820,6 +815,8 @@ if DONT-EXEC-PENDING is non-nil."
                           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)))
 
@@ -1820,15 +1817,13 @@ If UPDATE, append the scan lines, otherwise replace."
              "-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