changeset 48122:770c9bc95b39

(rmail-digest-end-regexps): Simplify. (undigestify-rmail-message): Fix paren-bug and simplify.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 02 Nov 2002 05:16:58 +0000
parents be4301be9646
children 66755860a8f1
files lisp/mail/undigest.el
diffstat 1 files changed, 5 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/undigest.el	Sat Nov 02 02:33:09 2002 +0000
+++ b/lisp/mail/undigest.el	Sat Nov 02 05:16:58 2002 +0000
@@ -31,11 +31,7 @@
 (require 'rmail)
 
 (defcustom rmail-digest-end-regexps
-  (list (concat "End of.*Digest.*\n"
-		(regexp-quote "*********") "*"
-		"\\(\n------*\\)*")
-	(concat "End of.*\n"
-		(regexp-quote "*") "*"))
+  (list "End of.*Digest.*\n" "End of.*\n")
   "*Regexps matching the end of a digest message."
   :group 'rmail
   :type '(repeat regexp))
@@ -86,13 +82,11 @@
 			(regexps rmail-digest-end-regexps))
 		    (while (and regexps (not found))
 		      (goto-char (point-max))
-		      (skip-chars-backward " \t\n")
 		      ;; compensate for broken un*x digestifiers.  Sigh Sigh.
-		      (while (and (> (point) start) (not found))
-			(forward-line -1)
-			(if (looking-at (car regexps))
-			    (setq found t))
-			(setq regexps (cdr regexps))))
+		      (setq found (re-search-backward
+				   (concat "^\\(?:" (car regexps) "\\)")
+				   start t))
+		      (setq regexps (cdr regexps)))
 		    (unless found
 		      (error "Message is not a digest--no end line"))))
 		(re-search-forward (concat "^" (make-string 55 ?-) "-*\n*"))