changeset 88297:64f03d0b622f

(rmail-summary-deleted-p): Fix misplaced paren. (rmail-summary-undelete): Simplify.
author Henrik Enberg <henrik.enberg@telia.com>
date Thu, 26 Jan 2006 19:42:44 +0000
parents dbb6c312383a
children 5bba61276888
files lisp/mail/rmailsum.el
diffstat 1 files changed, 16 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Wed Jan 25 20:22:06 2006 +0000
+++ b/lisp/mail/rmailsum.el	Thu Jan 26 19:42:44 2006 +0000
@@ -457,14 +457,11 @@
 (defun rmail-summary-mark-undeleted (n)
   (rmail-summary-mark-deleted n t))
 
-;;; mbox: ready
 (defun rmail-summary-deleted-p (&optional n)
-  (unless n
-    (setq n rmail-current-message)
-    (with-current-buffer rmail-buffer
-      (rmail-desc-deleted-p n))))
+  (unless n (setq n rmail-current-message))
+  (with-current-buffer rmail-buffer
+    (rmail-desc-deleted-p n)))
 
-;;; mbox: not sure.
 (defun rmail-summary-undelete (&optional arg)
   "Undelete current message.
 Optional prefix ARG means undelete ARG previous messages."
@@ -473,19 +470,19 @@
       (rmail-summary-undelete-many arg)
     (let ((buffer-read-only nil)
 	  (opoint (point)))
-      (end-of-line)
-      (cond ((re-search-backward "\\(^ *[0-9]*\\)\\(D\\)" nil t)
-	     (replace-match "\\1 ")
-	     (rmail-summary-goto-msg)
-	     (if rmail-enable-mime
-		 (set-buffer rmail-buffer)
-	       (pop-to-buffer rmail-buffer))
-	     (and (rmail-message-deleted-p rmail-current-message)
-		  (rmail-undelete-previous-message))
-	     (if rmail-enable-mime
-		 (pop-to-buffer rmail-view-buffer))
-	     (pop-to-buffer rmail-summary-buffer))
-	    (t (goto-char opoint))))))
+      (goto-char (line-end-position))
+      (if (not (re-search-backward "\\(^ *[0-9]*\\)\\(D\\)" nil t))
+	  (goto-char opoint)
+	(replace-match "\\1 ")
+	(rmail-summary-goto-msg)
+	(if rmail-enable-mime
+	    (set-buffer rmail-buffer)
+	  (pop-to-buffer rmail-buffer))
+	(when (rmail-message-deleted-p rmail-current-message)
+	  (rmail-undelete-previous-message))
+	(when rmail-enable-mime
+	  (pop-to-buffer rmail-view-buffer))
+	(pop-to-buffer rmail-summary-buffer)))))
 
 ;;; mbox: ready for testing
 (defun rmail-summary-undelete-many (&optional n)