From 546e9828be8e39aa275a4e2c53c217e86ae8f122 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 19 Feb 2002 22:53:15 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 37 ++++++++++++++++++++++++++++++++++++- lisp/gnus-art.el | 3 +-- lisp/gnus-fun.el | 22 ++++++++++++++++++++++ lisp/gnus-sum.el | 19 +++++++++---------- lisp/ietf-drums.el | 5 +++++ lisp/mail-source.el | 10 +++++++++- lisp/mm-decode.el | 4 +++- lisp/mm-view.el | 4 +--- lisp/nnultimate.el | 38 +++++++++++++++++++------------------- lisp/rfc2231.el | 7 ++++--- 10 files changed, 109 insertions(+), 40 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af0233c..3e71162 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,38 @@ +2002-02-19 Paul Jarc + + * gnus-sum.el (gnus-summary-toggle-header): Fix handling of + articles with no body and no blank line after the header. + +2002-02-19 ShengHuo ZHU + + * mm-decode.el (mm-dissect-multipart): Consider the case of empty + parts. + + * ietf-drums.el (ietf-drums-syntax-table): Modify syntax of + non-ascii chars. + + * rfc2231.el (rfc2231-parse-string): Support non-ascii chars. + + * gnus-art.el (gnus-article-wash-html-with-w3): Remove + w3-delay-image-loads. + * mm-view.el (mm-inline-text-html-render-with-w3): Ditto. + (mm-w3-prepare-buffer): Ditto. + + * mail-source.el (mail-source-fetch-directory): Run scripts. + +2002-02-19 Lars Magne Ingebrigtsen + + * gnus-fun.el (gnus-respond-to-confirmation): Do the right thing + for Majordomo confirmations. + +2002-02-18 Lars Magne Ingebrigtsen + + * gnus-fun.el (gnus-respond-to-confirmation): New command. + +2002-02-11 Lars Magne Ingebrigtsen + + * nnultimate.el (nnultimate-retrieve-headers): Clean up. + 2002-02-18 Paul Jarc * gnus-util.el (gnus-parent-id): Ignore trailing whitespace in the @@ -8719,7 +8754,7 @@ * gnus-sum.el (gnus-summary-edit-article): Remove a hack. * gnus-art.el (gnus-mime-save-part-and-strip): New function. (gnus-mime-action-alist): Use it. - (gnus-mime-button-commands): USe it. + (gnus-mime-button-commands): Use it. * mm-extern.el (mm-extern-local-file): Error when the file is gone. (mm-inline-external-body): unwind-protect. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 5a29e9a..ba9cf36 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2327,8 +2327,7 @@ If READ-CHARSET, ask for a coding system." (let ((w3-strict-width (window-width)) (url-standalone-mode t) (url-gateway-unplugged t) - (w3-honor-stylesheets nil) - (w3-delay-image-loads t)) + (w3-honor-stylesheets nil)) (condition-case var (w3-region (point-min) (point-max)) (error)))) diff --git a/lisp/gnus-fun.el b/lisp/gnus-fun.el index 4105a81..473470b 100644 --- a/lisp/gnus-fun.el +++ b/lisp/gnus-fun.el @@ -239,6 +239,28 @@ colors of the displayed X-Faces." (gnus-convert-image-to-gray-x-face (concat file ".gif") 3) (delete-file (concat file ".gif")))) +(defun gnus-respond-to-confirmation () + "Respond to a Gmane confirmation message." + (interactive) + (gnus-summary-show-article 'raw) + (set-buffer gnus-article-buffer) + (let ((buffer-read-only nil)) + (goto-char (point-min)) + (gnus-article-goto-header "Original-To") + (replace-match "To:")) + (let ((auth nil)) + (when (and (search-forward "Majordomo" nil t) + (re-search-forward "auth.*subscribe.*$" nil t)) + (setq auth (match-string 0))) + (message-wide-reply) + (goto-char (point-min)) + (gnus-article-goto-header "Cc") + (replace-match "From:") + (message-goto-body) + (delete-region (point) (point-max)) + (when auth + (insert auth "\n")))) + (provide 'gnus-fun) ;;; gnus-fun.el ends here diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 42340cb..edbc998 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -8312,20 +8312,19 @@ If ARG is a negative number, hide the unwanted header lines." (let* ((buffer-read-only nil) (inhibit-point-motion-hooks t) hidden e) - (setq hidden - (if (numberp arg) - (>= arg 0) - (save-restriction - (article-narrow-to-head) - (gnus-article-hidden-text-p 'headers)))) - (goto-char (point-min)) - (when (search-forward "\n\n" nil t) - (delete-region (point-min) (1- (point)))) + (save-restriction + (article-narrow-to-head) + (setq e (point-max) + hidden (if (numberp arg) + (>= arg 0) + (gnus-article-hidden-text-p 'headers)))) + (delete-region (point-min) e) (goto-char (point-min)) (save-excursion (set-buffer gnus-original-article-buffer) (goto-char (point-min)) - (setq e (1- (or (search-forward "\n\n" nil t) (point-max))))) + (setq e (search-forward "\n\n" nil t) + e (if e (1- e) (point-max)))) (insert-buffer-substring gnus-original-article-buffer 1 e) (save-restriction (narrow-to-region (point-min) (point)) diff --git a/lisp/ietf-drums.el b/lisp/ietf-drums.el index 76d243f..9c79e91 100644 --- a/lisp/ietf-drums.el +++ b/lisp/ietf-drums.el @@ -67,6 +67,11 @@ (modify-syntax-entry ?* " " table) (modify-syntax-entry ?\; " " table) (modify-syntax-entry ?\' " " table) + (if (featurep 'xemacs) + (let ((i 128)) + (while (< i 256) + (modify-syntax-entry i "w" table) + (setq i (1+ i))))) table)) (defun ietf-drums-token-to-list (token) diff --git a/lisp/mail-source.el b/lisp/mail-source.el index 2f11cd2..3409021 100644 --- a/lisp/mail-source.el +++ b/lisp/mail-source.el @@ -1,5 +1,5 @@ ;;; mail-source.el --- functions for fetching mail -;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news, mail @@ -291,6 +291,9 @@ Common keywords should be listed here.") (:path (or (getenv "MAIL") (expand-file-name (user-login-name) rmail-spool-directory)))) (directory + (:prescript) + (:prescript-delay) + (:postscript) (:path) (:suffix ".spool") (:predicate identity)) @@ -632,6 +635,9 @@ If ARGS, PROMPT is used as an argument to `format'." (defun mail-source-fetch-directory (source callback) "Fetcher for directory sources." (mail-source-bind (directory source) + (mail-source-run-script + prescript (format-spec-make ?t path) + prescript-delay) (let ((found 0) (mail-source-string (format "directory:%s" path))) (dolist (file (directory-files @@ -640,6 +646,8 @@ If ARGS, PROMPT is used as an argument to `format'." (funcall predicate file) (mail-source-movemail file mail-source-crash-box)) (incf found (mail-source-callback callback file)))) + (mail-source-run-script + postscript (format-spec-make ?t path)) found))) (defun mail-source-fetch-pop (source callback) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 89d60bb..68bb88d 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -567,7 +567,9 @@ for types in mm-keep-viewer-alive-types." (save-restriction (narrow-to-region start (point)) (setq parts (nconc (list (mm-dissect-buffer t)) parts))))) - (forward-line 2) + (end-of-line 2) + (or (looking-at boundary) + (forward-line 1)) (setq start (point))) (when (and start (< start end)) (save-excursion diff --git a/lisp/mm-view.el b/lisp/mm-view.el index 87e6cff..e35cf29 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -110,7 +110,6 @@ (url-standalone-mode t) (url-gateway-unplugged t) (w3-honor-stylesheets nil) - (w3-delay-image-loads t) (url-current-object (url-generic-parse-url (format "cid:%s" (mm-handle-id handle)))) (width (window-width)) @@ -433,8 +432,7 @@ will not be substituted.") (require 'w3) (let ((url-standalone-mode t) (url-gateway-unplugged t) - (w3-honor-stylesheets nil) - (w3-delay-image-loads t)) + (w3-honor-stylesheets nil)) (w3-prepare-buffer))) (defun mm-view-message () diff --git a/lisp/nnultimate.el b/lisp/nnultimate.el index 23153ee..9730922 100644 --- a/lisp/nnultimate.el +++ b/lisp/nnultimate.el @@ -173,25 +173,25 @@ datel nil)) (pop datel)) (when date - (setq date (delete "" (split-string - date "[-, \n\t\r    ]"))) - (if (or (member "AM" date) - (member "PM" date)) - (setq date (format - "%s %s %s %s" - (nth 1 date) - (if (and (>= (length (nth 0 date)) 3) - (assoc (downcase - (substring (nth 0 date) 0 3)) - parse-time-months)) - (substring (nth 0 date) 0 3) - (car (rassq (string-to-number (nth 0 date)) - parse-time-months))) - (nth 2 date) (nth 3 date))) - (setq date (format "%s %s %s %s" - (car (rassq (string-to-number (nth 1 date)) - parse-time-months)) - (nth 0 date) (nth 2 date) (nth 3 date))))) + (setq date (delete "" (split-string date "[-, \n\t\r    ]"))) + (setq date + (if (or (member "AM" date) + (member "PM" date)) + (format + "%s %s %s %s" + (nth 1 date) + (if (and (>= (length (nth 0 date)) 3) + (assoc (downcase + (substring (nth 0 date) 0 3)) + parse-time-months)) + (substring (nth 0 date) 0 3) + (car (rassq (string-to-number (nth 0 date)) + parse-time-months))) + (nth 2 date) (nth 3 date)) + (format "%s %s %s %s" + (car (rassq (string-to-number (nth 1 date)) + parse-time-months)) + (nth 0 date) (nth 2 date) (nth 3 date))))) (push (cons article diff --git a/lisp/rfc2231.el b/lisp/rfc2231.el index 2fcf7e2..5d9b491 100644 --- a/lisp/rfc2231.el +++ b/lisp/rfc2231.el @@ -1,6 +1,6 @@ ;;; rfc2231.el --- Functions for decoding rfc2231 headers -;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; This file is part of GNU Emacs. @@ -115,10 +115,11 @@ The list will be on the form (setq value (buffer-substring (1+ (point)) (progn (forward-sexp 1) (1- (point)))))) - ((and (memq c ttoken) + ((and (or (memq c ttoken) + (> c ?\177)) ;; EXTENSION: Support non-ascii chars. (not (memq c stoken))) (setq value (buffer-substring - (point) (progn (forward-sexp 1) (point))))) + (point) (progn (forward-sexp) (point))))) (t (error "Invalid header: %s" string))) (when encoded -- 1.7.10.4