]> git.eshelyaron.com Git - emacs.git/commitdiff
Attempt to eliminate some byte compiler warnings.
authorPaul Reilly <pmr@pajato.com>
Sat, 15 Feb 2003 13:53:57 +0000 (13:53 +0000)
committerPaul Reilly <pmr@pajato.com>
Sat, 15 Feb 2003 13:53:57 +0000 (13:53 +0000)
(rmail-cease-edit): Use the rmail message descriptor; simplify.

lisp/mail/rmailedit.el

index 3835070b341c4f77565becd55e02322b4012c75e..0054b0d692296ce7d7bd85d953b104cefe78ec4e 100644 (file)
 
 ;;; 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 @@ This functions runs the normal hook `rmail-edit-mode-hook'.
     (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 @@ This functions runs the normal hook `rmail-edit-mode-hook'.
     (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 @@ This functions runs the normal hook `rmail-edit-mode-hook'.
             (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 @@ This functions runs the normal hook `rmail-edit-mode-hook'.
   (rmail-cease-edit)
   (rmail-highlight-headers))
 
-(provide 'rmailedit)
-
 ;;; rmailedit.el ends here