changeset 88126:eefd09a79efd

Attempt to eliminate some byte compiler warnings. (rmail-cease-edit): Use the rmail message descriptor; simplify.
author Paul Reilly <pmr@pajato.com>
date Sat, 15 Feb 2003 13:53:57 +0000
parents 5da4d43003a3
children 9c783aa2b379
files lisp/mail/rmailedit.el
diffstat 1 files changed, 9 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailedit.el	Sat Feb 15 13:36:53 2003 +0000
+++ b/lisp/mail/rmailedit.el	Sat Feb 15 13:53:57 2003 +0000
@@ -26,7 +26,12 @@
 
 ;;; Code:
 
-(require 'rmail)
+(provide 'rmailedit)
+
+(eval-when-compile
+  (require 'rmail)
+  (require 'rmaildesc)
+  (require 'rmailsum))
 
 (defcustom rmail-edit-mode-hook nil
   "List of functions to call when editing an RMAIL message."
@@ -100,6 +105,7 @@
     (message "%s" (substitute-command-keys
 		   "Editing: Type \\[rmail-cease-edit] to return to Rmail, \\[rmail-abort-edit] to abort"))))
 
+;;; mbox: ready
 (defun rmail-cease-edit ()
   "Finish editing message; switch back to Rmail proper."
   (interactive)
@@ -113,8 +119,7 @@
     (if (/= (preceding-char) ?\n)
 	(insert "\n"))
     ;; Adjust the marker that points to the end of this message.
-    (set-marker (aref rmail-message-vector (1+ rmail-current-message))
-		(point)))
+    (rmail-desc-set-start (1+ rmail-current-message) (point)))
   (let ((old rmail-old-text))
     (force-mode-line-update)
     (kill-all-local-variables)
@@ -127,19 +132,7 @@
 	     (string= old (buffer-substring (point-min) (point-max))))
 	()
       (setq old nil)
-      (rmail-set-attribute "edited" t)
-      (if (boundp 'rmail-summary-vector)
-	  (progn
-	    (aset rmail-summary-vector (1- rmail-current-message) nil)
-	    (save-excursion
-	      (rmail-widen-to-current-msgbeg
-		(function (lambda ()
-			    (forward-line 2)
-			    (if (looking-at "Summary-line: ")
-				(let ((buffer-read-only nil))
-				  (delete-region (point)
-						 (progn (forward-line 1)
-							(point))))))))))))
+      (rmail-set-attribute "edited" t))
     (save-excursion
       (rmail-show-message)
       (rmail-toggle-header (if rmail-old-pruned 1 0))))
@@ -154,6 +147,4 @@
   (rmail-cease-edit)
   (rmail-highlight-headers))
 
-(provide 'rmailedit)
-
 ;;; rmailedit.el ends here