* nndoc.el (nndoc-mail-in-mail-type-p): Break a long regexp into
authorShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 6 Mar 2002 13:28:51 +0000 (13:28 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 6 Mar 2002 13:28:51 +0000 (13:28 +0000)
pieces.

lisp/ChangeLog
lisp/nndoc.el

index ac7cf5d..fbf61f2 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-06  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * nndoc.el (nndoc-mail-in-mail-type-p): Break a long regexp into
+       pieces.
+
 2002-03-05  Paul Jarc  <prj@po.cwru.edu>
 
        * nnnil.el: New file.
index bb2b805..3bcec06 100644 (file)
@@ -707,9 +707,11 @@ from the document.")
 
 (defun nndoc-mail-in-mail-type-p ()
   (save-excursion
-    (and (search-forward "\n\n" nil t)
-        (re-search-forward "^[-A-Za-z0-9]+: .*\n\\([ \t]?.*\n\\)*\\(^[-A-Za-z0-9]+: .*\n\\([ \t]?.*\n\\)*\\)+\n" nil t)
-        t)))
+    (while (re-search-forward "\n\n[-A-Za-z0-9]+:" nil t)
+      (forward-line)
+      (while (looking-at "[ \t]\\|[-A-Za-z0-9]+:")
+       (forward-line))
+      (looking-at "\n"))))
 
 (defun nndoc-mail-in-mail-article-begin ()
   (when (re-search-forward "^[-A-Za-z0-9]+: .*\n\\([ \t]?.*\n\\)*\\(^[-A-Za-z0-9]+: .*\n\\([ \t]?.*\n\\)*\\)+\n" nil t)