From: yamaoka Date: Fri, 6 Nov 1998 11:18:44 +0000 (+0000) Subject: * lisp/gnus-art.el (gnus-article-make-full-mail-header): New function. X-Git-Tag: pgnus-ichikawa-199811302358~92 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2585b44addddc95dbe40a62d07abc694f988a6f9;p=elisp%2Fgnus.git- * lisp/gnus-art.el (gnus-article-make-full-mail-header): New function. (gnus-article-mime-edit-article-setup): Use it. (gnus-article-mime-edit-exit): Use it. (gnus-article-mime-edit-article-setup): Set `gnus-show-mime' to t. * lisp/gnus-bbdb.el: Modify header description. --- diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index c8769c2..077c119 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2112,6 +2112,38 @@ commands: (erase-buffer) (insert-buffer-substring gnus-original-article-buffer))) +(defun gnus-article-make-full-mail-header (&optional number charset) + "Create a new mail header structure in a raw article buffer." + (unless (and number charset) + (save-current-buffer + (set-buffer gnus-summary-buffer) + (unless number + (setq number (or (cdr gnus-article-current) 0))) + (unless charset + (setq charset (or default-mime-charset 'x-ctext))))) + (goto-char (point-min)) + (let ((header-end (if (search-forward "\n\n" nil t) + (1- (point)) + (goto-char (point-max)))) + (chars (- (point-max) (point))) + (lines (count-lines (point) (point-max))) + (default-mime-charset charset) + xref) + (narrow-to-region (point-min) header-end) + (setq xref (std11-fetch-field "xref")) + (prog1 + (make-full-mail-header + number + (std11-fetch-field "subject") + (std11-fetch-field "from") + (std11-fetch-field "date") + (std11-fetch-field "message-id") + (std11-fetch-field "references") + chars + lines + (when xref (concat "Xref: " xref))) + (widen)))) + (defun gnus-article-prepare (article &optional all-headers header) "Prepare ARTICLE in article mode buffer. ARTICLE should either be an article number or a Message-ID. @@ -3115,6 +3147,7 @@ groups." (defun gnus-article-mime-edit-article-setup () "Convert current buffer to MIME-Edit buffer and turn on MIME-Edit mode after replacing with the original article." + (setq gnus-show-mime t) (setq gnus-article-edit-done-function `(lambda (&rest args) (when mime-edit-mode-flag @@ -3133,14 +3166,7 @@ after replacing with the original article." (set-buffer gnus-original-article-buffer) (erase-buffer) (insert-buffer gnus-article-buffer) - (setq gnus-current-headers - (mime-open-entity 'buffer (current-buffer))) - (mime-entity-set-representation-type-internal - gnus-current-headers 'gnus) - (mail-header-set-number gnus-current-headers - (save-excursion - (set-buffer gnus-summary-buffer) - gnus-current-article)) + (setq gnus-current-headers (gnus-article-make-full-mail-header)) (gnus-article-prepare-display))) (substitute-key-definition 'gnus-article-edit-exit 'gnus-article-mime-edit-exit @@ -3177,12 +3203,7 @@ after replacing with the original article." (set-buffer (get-buffer-create gnus-original-article-buffer)) (erase-buffer) (insert buf) - (setq gnus-current-headers (mime-open-entity 'buffer (current-buffer))) - (mime-entity-set-representation-type-internal gnus-current-headers 'gnus) - (mail-header-set-number gnus-current-headers - (save-excursion - (set-buffer gnus-summary-buffer) - gnus-current-article)) + (setq gnus-current-headers (gnus-article-make-full-mail-header)) (gnus-article-prepare-display) (set-window-configuration winconf))) diff --git a/lisp/gnus-bbdb.el b/lisp/gnus-bbdb.el index 8019ef4..1e66f8c 100644 --- a/lisp/gnus-bbdb.el +++ b/lisp/gnus-bbdb.el @@ -1,4 +1,4 @@ -;; gnus-bbdb.el --- Interface to Nana-gnus version 6.10.2. +;; gnus-bbdb.el --- Interface to Semi-gnus ;; Copyright (c) 1991,1992,1993 Jamie Zawinski . ;; Copyright (C) 1995,1996,1997 Shuhei KOBAYASHI @@ -9,7 +9,7 @@ ;; Author: Shuhei KOBAYASHI ;; Keywords: BBDB, MIME, multimedia, multilingual, mail, news -;; This file is part of Nana-gnus. +;; This file is part of Semi-gnus. ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as