;;; 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>
(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.
(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"))
(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
(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.")
(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)))
(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)))