X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fnnheader.el;h=5751973723b21cde8ea35c69d7c5fabfd9fcd94e;hb=754a007c9c67f3506008dab6e7e8943eb51848f2;hp=5b7da45d6b5f098703119e6fd21b453fc38d9234;hpb=3f8dcafe9860c534c8c066e6ddad362ea0aa0c7a;p=gnus diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 5b7da45d6..575197372 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -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 ;; Lars Magne Ingebrigtsen @@ -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 (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 (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 (coding-system-for-read nnheader-file-coding-system)) (apply 'find-file-noselect args)))