aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-10-04 18:39:31 +0000
committerRichard M. Stallman1996-10-04 18:39:31 +0000
commitea7bddc4ce496a4c6342dd12977f046f8674425e (patch)
treef215214fd6980f4fed152ae11e25ba1f5aa8521b
parent47afc068c062f3fbc04e6938705ded7fe468eecf (diff)
downloademacs-ea7bddc4ce496a4c6342dd12977f046f8674425e.tar.gz
emacs-ea7bddc4ce496a4c6342dd12977f046f8674425e.zip
(rmail-summary-line-count-p): New variable.
(rmail-make-basic-summary-line): Optionally exclude the line count.
-rw-r--r--lisp/mail/rmailsum.el42
1 files changed, 24 insertions, 18 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 0ce313d0fe7..06540e16370 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -37,6 +37,10 @@
37(defvar rmail-summary-scroll-between-messages t 37(defvar rmail-summary-scroll-between-messages t
38 "*Non-nil means Rmail summary scroll commands move between messages.") 38 "*Non-nil means Rmail summary scroll commands move between messages.")
39 39
40;;;###autoload
41(defvar rmail-summary-line-count-p t
42 "*Non-nil if Rmail summary should show the number of lines in each message.")
43
40(defvar rmail-summary-font-lock-keywords 44(defvar rmail-summary-font-lock-keywords
41 '(("^....D.*" . font-lock-string-face) ; Deleted. 45 '(("^....D.*" . font-lock-string-face) ; Deleted.
42 ("^....-.*" . font-lock-type-face) ; Unread. 46 ("^....-.*" . font-lock-type-face) ; Unread.
@@ -404,24 +408,26 @@ nil for FUNCTION means all messages."
404 (- len 25)) 408 (- len 25))
405 (t (- mch 14)))) 409 (t (- mch 14))))
406 (min len (+ lo 25)))))))) 410 (min len (+ lo 25))))))))
407 (save-excursion 411 (if rmail-summary-line-count-p
408 (save-restriction 412 (save-excursion
409 (widen) 413 (save-restriction
410 (let ((beg (rmail-msgbeg msgnum)) 414 (widen)
411 (end (rmail-msgend msgnum)) 415 (let ((beg (rmail-msgbeg msgnum))
412 lines) 416 (end (rmail-msgend msgnum))
413 (save-excursion 417 lines)
414 (goto-char beg) 418 (save-excursion
415 ;; Count only lines in the reformatted header, 419 (goto-char beg)
416 ;; if we have reformatted it. 420 ;; Count only lines in the reformatted header,
417 (search-forward "\n*** EOOH ***\n" end t) 421 ;; if we have reformatted it.
418 (setq lines (count-lines (point) end))) 422 (search-forward "\n*** EOOH ***\n" end t)
419 (format (cond 423 (setq lines (count-lines (point) end)))
420 ((<= lines 9) " [%d]") 424 (format (cond
421 ((<= lines 99) " [%d]") 425 ((<= lines 9) " [%d]")
422 ((<= lines 999) " [%3d]") 426 ((<= lines 99) " [%d]")
423 (t "[%d]")) 427 ((<= lines 999) " [%3d]")
424 lines)))) 428 (t "[%d]"))
429 lines))))
430 " ")
425 " #" ;The # is part of the format. 431 " #" ;The # is part of the format.
426 (if (re-search-forward "^Subject:" nil t) 432 (if (re-search-forward "^Subject:" nil t)
427 (progn (skip-chars-forward " \t") 433 (progn (skip-chars-forward " \t")