diff lisp/vm/vm-undo.el @ 30:ec9a17fef872 r19-15b98

Import from CVS: tag r19-15b98
author cvs
date Mon, 13 Aug 2007 08:52:29 +0200
parents 859a2309aef8
children 131b0175ea99
line wrap: on
line diff
--- a/lisp/vm/vm-undo.el	Mon Aug 13 08:51:58 2007 +0200
+++ b/lisp/vm/vm-undo.el	Mon Aug 13 08:52:29 2007 +0200
@@ -360,13 +360,8 @@
 		       (vm-buffer-of
 			 (vm-real-message-of m)))
 		      vm-folder-read-only))))
-      (aset (vm-attributes-of m) attr-index flag)
-      (vm-mark-for-summary-update m)
       (cond
        ((not norecord)
-	(if (eq vm-flush-interval t)
-	    (vm-stuff-virtual-attributes m)
-	  (vm-set-modflag-of m t))
 	(setq vmp (cons (vm-real-message-of m) (vm-virtual-messages-of m)))
 	(while vmp
 	  (if (eq (vm-attributes-of m) (vm-attributes-of (car vmp)))
@@ -383,7 +378,14 @@
 	    (vm-undo-record (list function (car m-list) (not flag)))
 	    (vm-undo-boundary)
 	    (vm-increment vm-modification-counter))
-	  (setq m-list (cdr m-list)))))))))
+	  (setq m-list (cdr m-list)))))
+      (aset (vm-attributes-of m) attr-index flag)
+      (vm-mark-for-summary-update m)
+      (if (not norecord)
+	  (if (eq vm-flush-interval t)
+	      (vm-stuff-virtual-attributes m)
+	    (vm-set-modflag-of m t)))))))
+
 
 (defun vm-set-labels (m labels)
   (let ((m-list nil)
@@ -397,12 +399,6 @@
 		       (vm-buffer-of
 			 (vm-real-message-of m)))
 		      vm-folder-read-only))))
-      (vm-set-labels-of m labels)
-      (vm-set-label-string-of m nil)
-      (vm-mark-for-summary-update m)
-      (if (eq vm-flush-interval t)
-	  (vm-stuff-virtual-attributes m)
-	(vm-set-modflag-of m t))
       (setq vmp (cons (vm-real-message-of m) (vm-virtual-messages-of m)))
       (while vmp
 	(if (eq (vm-attributes-of m) (vm-attributes-of (car vmp)))
@@ -419,7 +415,14 @@
 	  (vm-undo-record (list 'vm-set-labels m old-labels))
 	  (vm-undo-boundary)
 	  (vm-increment vm-modification-counter))
-	(setq m-list (cdr m-list)))))))
+	(setq m-list (cdr m-list)))
+      (vm-set-labels-of m labels)
+      (vm-set-label-string-of m nil)
+      (vm-mark-for-summary-update m)
+      (if (eq vm-flush-interval t)
+	  (vm-stuff-virtual-attributes m)
+	(vm-set-modflag-of m t))))))
+
 
 (defun vm-set-new-flag (m flag &optional norecord)
   (vm-set-xxxx-flag m flag norecord 'vm-set-new-flag 0))