From 85bd1ac690b2bf666e228dba678a4a21909d7e6d Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Wed, 24 Jan 1996 23:30:25 +0000 Subject: [PATCH] (rmail-make-basic-summary-line): Include msg line number. (rmail-summary-goto-msg): Pass along args NOWARN and SKIP-RMAIL in recursive call. --- lisp/mail/rmailsum.el | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index c77fadabbc4..c0f286a7ce2 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -378,6 +378,17 @@ nil for FUNCTION means all messages." (- 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 @@ Deleted messages stay in the file until the \\[rmail-expunge] command is given." (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 @@ Commands for sorting the summary: (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 @@ Commands for sorting the summary: (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)) -- 2.39.2