2000-11-22 16:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 22 Nov 2000 20:34:00 +0000 (20:34 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 22 Nov 2000 20:34:00 +0000 (20:34 +0000)
* gnus-cite.el (gnus-cite-parse): Guess citation length.

lisp/ChangeLog
lisp/gnus-cite.el

index 6a0d640..d82e0a3 100644 (file)
@@ -1,3 +1,7 @@
+2000-11-22 16:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-cite.el (gnus-cite-parse): Guess citation length.
+
 2000-11-22 14:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-ml.el (gnus-mailing-list-insinuate): New function.
index 734d21c..a5c96fc 100644 (file)
@@ -659,22 +659,24 @@ See also the documentation for `gnus-article-highlight-citation'."
               (gnus-article-search-signature)
               (point)))
        (prefix-regexp (concat "^\\(" message-cite-prefix-regexp "\\)"))
-       alist entry start begin end numbers prefix)
+       alist entry start begin end numbers prefix guess-limit)
     ;; Get all potential prefixes in `alist'.
     (while (< (point) max)
       ;; Each line.
       (setq begin (point)
+           guess-limit (progn (skip-chars-forward "^> \t\r\n") (point))
            end (progn (beginning-of-line 2) (point))
            start end)
       (goto-char begin)
       ;; Ignore standard Supercite attribution prefix.
-      (when (looking-at gnus-supercite-regexp)
+      (when (and (< guess-limit (+ begin gnus-cite-max-prefix))
+                (looking-at gnus-supercite-regexp))
        (if (match-end 1)
            (setq end (1+ (match-end 1)))
          (setq end (1+ begin))))
       ;; Ignore very long prefixes.
-      (when (> end (+ (point) gnus-cite-max-prefix))
-       (setq end (+ (point) gnus-cite-max-prefix)))
+      (when (> end (+ begin gnus-cite-max-prefix))
+       (setq end (+ begin gnus-cite-max-prefix)))
       (while (re-search-forward prefix-regexp (1- end) t)
        ;; Each prefix.
        (setq end (match-end 0)