From 6d9929bf52dca56ed7f5f16d4bfa6058a5a91279 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 21 Dec 2000 05:46:59 +0000 Subject: [PATCH] Change highlighting so that only the date, subject, and author are highlighted. This makes it easier to see point. --- v7/src/imail/imail-summary.scm | 36 ++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/v7/src/imail/imail-summary.scm b/v7/src/imail/imail-summary.scm index fe6bdf1f4..a04f12eff 100644 --- a/v7/src/imail/imail-summary.scm +++ b/v7/src/imail/imail-summary.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-summary.scm,v 1.36 2000/12/21 05:00:25 cph Exp $ +;;; $Id: imail-summary.scm,v 1.37 2000/12/21 05:46:59 cph Exp $ ;;; ;;; Copyright (c) 2000 Massachusetts Institute of Technology ;;; @@ -458,15 +458,22 @@ SUBJECT is a string of regexps separated by commas." (selected-message #f (buffer-get buffer 'IMAIL-FOLDER-BUFFER #f)))) (define (imail-summary-selected-message-index mark) - (let ((regs - (re-match-forward "[* ][D ][U ][A ][R ][F ] +\\([0-9]+\\) " - (line-start mark 0) - (line-end mark 0) - #f))) - (and regs - (- (string->number - (extract-string (re-match-start 1) (re-match-end 1))) - 1)))) + (and (imail-summary-match-line mark) + (- (string->number + (extract-string (re-match-start 1) (re-match-end 1))) + 1))) + +(define (imail-summary-match-line mark) + (re-match-forward + (string-append + "[* ][D ][U ][A ][R ][F ] +\\([0-9]+\\) +\\([0-9.]+[a-zA-Z ]\\)" + (if (ref-variable imail-summary-show-date mark) + " \\([ 123][0-9] [a-zA-Z]+\\)" + "") + " ") + (line-start mark 0) + (line-end mark 0) + #f)) (define (imail-summary-select-message buffer message) (highlight-region (buffer-unclipped-region buffer) #f) @@ -478,8 +485,13 @@ SUBJECT is a string of regexps separated by commas." (if (and (not approximate?) (ref-variable imail-summary-highlight-message buffer)) (begin - (highlight-region (make-region mark (line-end mark 0)) - #t) + (highlight-region + (make-region (if (imail-summary-match-line mark) + (or (re-match-start 3) + (re-match-end 0)) + mark) + (line-end mark 0)) + #t) (buffer-not-modified! buffer))))))) (if (ref-variable imail-summary-pop-up-message buffer) (imail-summary-pop-up-message-buffer buffer))) -- 2.25.1