changeset 88133:aa85e6f55862

(rmail-msg-restore-non-pruned-header, rmail-msg-prune-header): Use the rmail message descriptor. (rmail-msgbeg, rmail-msgend): Even though these are deprecated, update them to DTRT for external callers.
author Paul Reilly <pmr@pajato.com>
date Tue, 18 Feb 2003 16:25:49 +0000
parents 7335eaf754d2
children abff0bc9014b
files lisp/mail/rmail.el
diffstat 1 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Sat Feb 15 18:03:27 2003 +0000
+++ b/lisp/mail/rmail.el	Tue Feb 18 16:25:49 2003 +0000
@@ -1291,7 +1291,7 @@
 	  (bury-buffer rmail-summary-buffer)))
     (quit-window)))
 
-;;; mbox: not ready
+;;; mbox: ready
 (defun rmail-duplicate-message ()
   "Create a duplicated copy of the current message.
 The duplicate copy goes into the Rmail file just after the
@@ -2010,13 +2010,16 @@
   instead of the current message."
   (rmail-desc-get-header-display-state (or msg rmail-current-message)))
 
+;; mbox: untested
 (defun rmail-msg-restore-non-pruned-header ()
   (let ((old-point (point))
 	new-point
 	new-start
 	(inhibit-read-only t))
     (save-excursion
-      (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
+      (narrow-to-region
+       (rmail-desc-get-start rmail-current-message)
+       (point-max))
       (goto-char (point-min))
       (forward-line 1)
       ;; Change 1 to 0.
@@ -2044,11 +2047,14 @@
     (if new-point
 	(goto-char new-point))))
 
+;; mbox: untested
 (defun rmail-msg-prune-header ()
   (let ((new-point
 	 (= (point) (point-min))))
     (save-excursion
-      (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
+      (narrow-to-region
+       (rmail-desc-get-start rmail-current-message)
+       (point-max))
       (rmail-reformat-message (point-min) (point-max)))
     (if new-point
 	(goto-char (point-min)))))
@@ -2147,11 +2153,13 @@
 
 ;;;; *** Rmail Message Selection And Support ***
 
+;; mbox: deprecated. -pmr
 (defun rmail-msgend (n)
-  (marker-position (aref rmail-message-vector (1+ n))))
-
+  (rmail-desc-get-start n))
+
+;; mbox: deprecated. -pmr
 (defun rmail-msgbeg (n)
-  (marker-position (aref rmail-message-vector n)))
+  (rmail-desc-get-end n))
 
 (defun rmail-widen-to-current-msgbeg (function)
   "Call FUNCTION with point at start of internal data of current message.