From: yamaoka Date: Tue, 24 Jul 2001 22:28:57 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_4-04-quimby-last-~15 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4edb6643158e700581cf56e365537e9045d86a83;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5cd1142..d758ad6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,35 @@ +2001-07-24 13:00:00 ShengHuo ZHU + + * gnus-sum.el (gnus-summary-display-arrow): Test fboundp. + +2001-07-24 12:00:00 ShengHuo ZHU + + * mm-encode.el (mm-encode-buffer): Don't use 7bit encoding if + there are long lines. + +2001-07-24 Katsumi Yamaoka + + * dgnushack.el (copy-list): New compiler macro. + +2001-07-24 09:00:00 ShengHuo ZHU + + * message.el (message-bounce): If no Return-Path, the whole + content is considered as the original message. + + * nnml.el (nnml-check-directory-twice): New. + (nnml-article-to-file): Use it. + (nnml-retrieve-headers): Hack it. + +2001-07-24 02:00:00 ShengHuo ZHU + + * gnus-win.el (gnus-buffer-configuration): New configure. + + * gnus-art.el (gnus-mm-display-part): Don't select-window if it is + not alive. + + * mm-decode.el (mm-remove-part): Don't murder the current window (nil). + (mm-display-external): Use display-term configure. + 2001-07-24 Kai Gro,A_(Bjohann * gnus-delay.el (gnus-delay-default-hour): New variable. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index dc7152c..db78d78 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -4054,7 +4054,8 @@ If no internal viewer is available, use an external viewer." nil id (gnus-article-mime-total-parts) (mm-handle-media-type handle))))) - (select-window window)))) + (if (window-live-p window) + (select-window window))))) (goto-char point) (delete-region (gnus-point-at-bol) (progn (forward-line 1) (point))) (gnus-insert-mime-button diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index d81cb10..8f100f9 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -827,8 +827,7 @@ automatically when it is selected." :type 'hook) (defcustom gnus-summary-display-arrow - (and (string-match "GNU" (emacs-version)) - (>= emacs-major-version 21) + (and (fboundp 'display-graphic-p) (display-graphic-p)) "*If non-nil, display an arrow highlighting the current article." :version "21.1" diff --git a/lisp/gnus-win.el b/lisp/gnus-win.el index dcdd179..c8f8efc 100644 --- a/lisp/gnus-win.el +++ b/lisp/gnus-win.el @@ -165,7 +165,10 @@ (compose-bounce (vertical 1.0 (article 0.5) - (message 1.0 point)))) + (message 1.0 point))) + (display-term + (vertical 1.0 + ("*display*" 1.0)))) "Window configuration for all possible Gnus buffers. See the Gnus manual for an explanation of the syntax used.") diff --git a/lisp/message.el b/lisp/message.el index 4e67115..721ebd6 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -5383,18 +5383,20 @@ you." (widen) (goto-char (point-min)) (search-forward "\n\n" nil t) - (or (and boundary - (re-search-forward boundary nil t) - (forward-line 2)) - (and (re-search-forward message-unsent-separator nil t) - (forward-line 1)) - (re-search-forward "^Return-Path:.*\n" nil t)) - ;; We remove everything before the bounced mail. - (delete-region - (point-min) - (if (re-search-forward "^[^ \n\t]+:" nil t) - (match-beginning 0) - (point))) + (if (or (and boundary + (re-search-forward boundary nil t) + (forward-line 2)) + (and (re-search-forward message-unsent-separator nil t) + (forward-line 1)) + (re-search-forward "^Return-Path:.*\n" nil t)) + ;; We remove everything before the bounced mail. + (delete-region + (point-min) + (if (re-search-forward "^[^ \n\t]+:" nil t) + (match-beginning 0) + (point))) + (when (re-search-backward "^.?From .*\n" nil t) + (delete-region (match-beginning 0) (match-end 0)))) (save-restriction (message-narrow-to-head-1) (message-remove-header message-ignored-bounced-headers t) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index ff89739..b6fb1c4 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -631,15 +631,25 @@ external if displayed external." (mm-mailcap-command method file (mm-handle-type handle))) (require 'term) - (switch-to-buffer - (make-term "display" - shell-file-name - nil - shell-command-switch - (mm-mailcap-command - method file (mm-handle-type handle)))) + (require 'gnus-win) + (set-buffer + (setq buffer + (make-term "display" + shell-file-name + nil + shell-command-switch + (mm-mailcap-command + method file + (mm-handle-type handle))))) (term-mode) - (term-char-mode)) + (term-char-mode) + (set-process-sentinel + (get-buffer-process buffer) + `(lambda (process state) + (if (eq 'exit (process-status process)) + (gnus-configure-windows + ',gnus-current-window-configuration)))) + (gnus-configure-windows 'display-term)) (mm-handle-set-external-undisplayer handle (cons file buffer))) (message "Displaying %s..." (format method file)) 'external) @@ -758,7 +768,7 @@ external if displayed external." ((consp object) (ignore-errors (delete-file (car object))) (ignore-errors (delete-directory (file-name-directory (car object)))) - (ignore-errors (kill-buffer (cdr object)))) + (ignore-errors (and (cdr object) (kill-buffer (cdr object))))) ((bufferp object) (when (buffer-live-p object) (kill-buffer object))))) diff --git a/lisp/mm-encode.el b/lisp/mm-encode.el index fee9e25..f06dd6f 100644 --- a/lisp/mm-encode.el +++ b/lisp/mm-encode.el @@ -119,7 +119,8 @@ The encoding used is returned." (bits (mm-body-7-or-8))) ;; We force buffers that are 7bit to be unencoded, no matter ;; what the preferred encoding is. - (when (eq bits '7bit) + ;; Only if the buffers don't contain lone lines. + (when (and (eq bits '7bit) (not (mm-long-lines-p 76))) (setq encoding bits)) (mm-encode-content-transfer-encoding encoding mime-type) encoding)) diff --git a/lisp/nnml.el b/lisp/nnml.el index c31cede..0f85564 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -88,6 +88,9 @@ all. This may very well take some time.") (defvoo nnml-generate-active-function 'nnml-generate-active-info) (defvar nnml-nov-buffer-file-name nil) +(defvar nnml-check-directory-twice t + "If t, to make sure nothing went wrong when reading over NFS -- +check twice.") (defvoo nnml-file-coding-system nnmail-file-coding-system) @@ -102,12 +105,17 @@ all. This may very well take some time.") (save-excursion (set-buffer nntp-server-buffer) (erase-buffer) - (let ((file nil) - (number (length sequence)) - (count 0) - (file-name-coding-system nnmail-pathname-coding-system) - (pathname-coding-system nnmail-pathname-coding-system) - beg article) + (let* ((file nil) + (number (length sequence)) + (count 0) + (file-name-coding-system nnmail-pathname-coding-system) + (pathname-coding-system nnmail-pathname-coding-system) + beg article + (nnml-check-directory-twice + (and nnml-check-directory-twice + ;; To speed up, disable it in some case. + (or (not (numberp nnmail-large-newsgroup)) + (<= number nnmail-large-newsgroup))))) (if (stringp (car sequence)) 'headers (if (nnml-retrieve-headers-with-nov sequence fetch-old) @@ -496,13 +504,14 @@ all. This may very well take some time.") (let (file) (if (setq file (cdr (assq article nnml-article-file-alist))) (expand-file-name file nnml-current-directory) - ;; Just to make sure nothing went wrong when reading over NFS -- - ;; check once more. - (when (file-exists-p - (setq file (expand-file-name (number-to-string article) - nnml-current-directory))) - (nnml-update-file-alist t) - file)))) + (if nnml-check-directory-twice + ;; Just to make sure nothing went wrong when reading over NFS -- + ;; check once more. + (when (file-exists-p + (setq file (expand-file-name (number-to-string article) + nnml-current-directory))) + (nnml-update-file-alist t) + file))))) (defun nnml-deletable-article-p (group article) "Say whether ARTICLE in GROUP can be deleted."