changeset 14293:87b4bd8fea26

(rmail-make-basic-summary-line): Include msg line number. (rmail-summary-goto-msg): Pass along args NOWARN and SKIP-RMAIL in recursive call.
author Karl Heuer <kwzh@gnu.org>
date Wed, 24 Jan 1996 23:30:25 +0000
parents 7e97c9b8801f
children f8eba77ccb7f
files lisp/mail/rmailsum.el
diffstat 1 files changed, 21 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Wed Jan 24 23:29:33 1996 +0000
+++ b/lisp/mail/rmailsum.el	Wed Jan 24 23:30:25 1996 +0000
@@ -378,6 +378,17 @@
 						     (- len 25))
 						    (t (- mch 14))))
 				     (min len (+ lo 25))))))))
+	  (save-excursion
+	    (save-restriction
+	      (widen)
+	      (let
+		  ((lines (count-lines (rmail-msgbeg msgnum) (rmail-msgend msgnum))))
+		(format (cond
+			 ((<= lines     9) "   [%d]")
+			 ((<= lines    99) "  [%d]")
+			 ((<= lines   999) " [%3d]")
+			 (t		    "[%d]"))
+			lines))))
 	  "  #"
 	  (if (re-search-forward "^Subject:" nil t)
 	      (progn (skip-chars-forward " \t")
@@ -530,6 +541,7 @@
   (rmail-summary-delete-forward t))
 
 (defun rmail-summary-mark-deleted (&optional n undel)
+  ;; Since third arg is t, this only alters the summary, not the Rmail buf.
   (and n (rmail-summary-goto-msg n t t))
   (or (eobp)
       (not (overlay-get rmail-summary-overlay 'face))
@@ -877,6 +889,14 @@
 (defvar rmail-summary-overlay nil)
 (put 'rmail-summary-overlay 'permanent-local t)
 
+;; Go to message N in the summary buffer which is current,
+;; and in the corresponding Rmail buffer.
+;; If N is nil, use the message corresponding to point in the summary
+;; and move to that message in the Rmail buffer.
+
+;; If NOWARN, don't say anything if N is out of range.
+;; If SKIP-RMAIL, don't do anything to the Rmail buffer.
+
 (defun rmail-summary-goto-msg (&optional n nowarn skip-rmail)
   (interactive "P")
   (if (consp n) (setq n (prefix-numeric-value n)))
@@ -902,7 +922,7 @@
       (if (> n total)
 	  (progn (message "No following message")
 		 (goto-char (point-max))
-		 (rmail-summary-goto-msg)))
+		 (rmail-summary-goto-msg nil nowarn skip-rmail)))
       (goto-char (point-min))
       (if (not (re-search-forward (format "^%4d[^0-9]" n) nil t))
 	  (progn (or nowarn (message "Message %d not found" n))