Synch with Oort Gnus.
authoryamaoka <yamaoka>
Tue, 24 Jul 2001 22:28:57 +0000 (22:28 +0000)
committeryamaoka <yamaoka>
Tue, 24 Jul 2001 22:28:57 +0000 (22:28 +0000)
lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-sum.el
lisp/gnus-win.el
lisp/message.el
lisp/mm-decode.el
lisp/mm-encode.el
lisp/nnml.el

index 5cd1142..d758ad6 100644 (file)
@@ -1,3 +1,35 @@
+2001-07-24 13:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-sum.el (gnus-summary-display-arrow): Test fboundp.
+
+2001-07-24 12:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * mm-encode.el (mm-encode-buffer): Don't use 7bit encoding if
+       there are long lines.
+
+2001-07-24  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * dgnushack.el (copy-list): New compiler macro.
+
+2001-07-24 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * 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  <zsh@cs.rochester.edu>
+
+       * 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\e,A_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
        * gnus-delay.el (gnus-delay-default-hour): New variable.
index dc7152c..db78d78 100644 (file)
@@ -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
index d81cb10..8f100f9 100644 (file)
@@ -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"
index dcdd179..c8f8efc 100644 (file)
     (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.")
 
index 4e67115..721ebd6 100644 (file)
@@ -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)
index ff89739..b6fb1c4 100644 (file)
@@ -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)))))
index fee9e25..f06dd6f 100644 (file)
@@ -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))
index c31cede..0f85564 100644 (file)
@@ -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."