*** empty log message ***
[gnus] / lisp / nnheader.el
index 5b7da45..5751973 100644 (file)
@@ -1,5 +1,5 @@
 ;;; nnheader.el --- header access macros for Gnus and its backends
-;; Copyright (C) 1987,88,89,90,93,94,95,96,97 Free Software Foundation, Inc.
+;; Copyright (C) 1987,88,89,90,93,94,95,96,97,98 Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
 ;;     Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
@@ -59,7 +59,10 @@ on your system, you could say something like:
  (autoload 'mail-position-on-field "sendmail")
  (autoload 'message-remove-header "message")
  (autoload 'cancel-function-timers "timers")
- (autoload 'gnus-point-at-eol "gnus-util"))
+ (autoload 'gnus-point-at-eol "gnus-util")
+ (autoload 'gnus-delete-line "gnus-util")
+ (autoload 'gnus-buffer-live-p "gnus-util")
+ (autoload 'gnus-encode-coding-string "gnus-ems"))
 
 ;;; Header access macros.
 
@@ -166,7 +169,7 @@ on your system, you could say something like:
   (let ((case-fold-search t)
        (cur (current-buffer))
        (buffer-read-only nil)
-       in-reply-to lines p)
+       in-reply-to lines p ref)
     (goto-char (point-min))
     (when naked
       (insert "\n"))
@@ -231,8 +234,14 @@ on your system, you could say something like:
               (if (and (search-forward "\nin-reply-to: " nil t)
                        (setq in-reply-to (nnheader-header-value))
                        (string-match "<[^>]+>" in-reply-to))
-                  (substring in-reply-to (match-beginning 0)
-                             (match-end 0))
+                  (let (ref2)
+                    (setq ref (substring in-reply-to (match-beginning 0)
+                                         (match-end 0)))
+                    (while (string-match "<[^>]+>" in-reply-to (match-end 0))
+                      (setq ref2 (substring in-reply-to (match-beginning 0)
+                                            (match-end 0)))
+                      (when (> (length ref2) (length ref))
+                        (setq ref ref2))))
                 "")))
           ;; Chars.
           0
@@ -745,7 +754,6 @@ If FILE, find the \".../etc/PACKAGE\" file instead."
       (when (string-match (car ange-ftp-path-format) path)
        (ange-ftp-re-read-dir path)))))
 
-;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
 (defvar nnheader-file-coding-system 'raw-text
   "Coding system used in file backends of Gnus.")
 
@@ -759,7 +767,6 @@ find-file-hooks, etc.
        (auto-mode-alist (nnheader-auto-mode-alist))
        (default-major-mode 'fundamental-mode)
         (after-insert-file-functions nil)
-       ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
        (coding-system-for-read nnheader-file-coding-system))
     (insert-file-contents filename visit beg end replace)))
 
@@ -769,7 +776,6 @@ find-file-hooks, etc.
        (default-major-mode 'fundamental-mode)
        (enable-local-variables nil)
         (after-insert-file-functions nil)
-       ;; 1997/5/16 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
        (coding-system-for-read nnheader-file-coding-system))
     (apply 'find-file-noselect args)))