From: yamaoka Date: Tue, 10 Jul 2001 00:58:04 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_4-04-quimby~18 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=826a0e5c29b5b7c0572f1c67b21f107f78027073;p=elisp%2Fgnus.git- Synch with Oort Gnus. * dgnushack.el: Fix last change. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b155da..b36579f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,33 @@ +2001-07-09 17:00:00 ShengHuo ZHU + + * mm-view.el (mm-inline-text): w3-coding-system-for-mime-charset + may not defined. From: Raja R Harinath . + + * message.el (message-send-mail-real-function): New variable. + (message-send-mail-partially, message-send-mail): + + * nngateway.el (nngateway-request-post): Use it. + + * gnus-agent.el (gnus-agentize): Use it. + + * nnsoup.el (nnsoup-old-functions, nnsoup-set-variables) + (nnsoup-revert-variables): Use it. + +2001-07-09 Colin Walters + + * mm-decode.el (mm-inline-media-tests): Default to displaying as + text/plain if the type doesn't match any other media types. + (mm-inlined-types): Doc fix. + (mm-display-inline): Revert previous change (now handled by a + default type in `mm-inline-media-tests'. + (mm-inlinable-p): Revive. + (mm-display-part): Call `mm-inlinable-p'. + (mm-attachment-override-p): Ditto. + (mm-inlined-p): Doc fix. + + * gnus-art.el (gnus-mime-display-single): Call `mm-inlinable-p' as + well as `mm-inlined-p'. + 2001-07-09 13:00:00 ShengHuo ZHU * nntp.el (nntp-send-command, nntp-send-command-nodelete): diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 5cb8b8e..40f2a78 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -177,21 +177,25 @@ to the specified name LIBRARY (a la calling `load' instead of `load-library')." ;; included in the standard `load-path' or added by the configure ;; option "--with-addpath=". (let ((path (or (locate-library "path-util") - (locate-library "apel/path-util"))));; backward compat. + (locate-library "apel/path-util")));; backward compat. + parent lpath) (if path (progn (when (string-match "/$" (setq path (file-name-directory path))) (setq path (substring path 0 (match-beginning 0)))) ;; path == "/var/home/john/lisp/apel-VERSION" - (unless (or (member path load-path) - (member (file-name-as-directory path) load-path)) - (push path load-path)) - (when (string-match "/$" (setq path (file-name-directory path))) - (setq path (substring path 0 (match-beginning 0)))) - ;; path == "/var/home/john/lisp" - (unless (or (member path load-path) - (member (file-name-as-directory path) load-path)) - (push path (cdr load-path))) + (when (string-match "/$" (setq parent (file-name-directory path))) + (setq parent (substring path 0 (match-beginning 0)))) + ;; parent == "/var/home/john/lisp" + (if (setq lpath (or (member path load-path) + (member (file-name-as-directory path) load-path))) + (unless (or (member parent load-path) + (member (file-name-as-directory parent) load-path)) + (push parent (cdr lpath))) + (push path load-path) + (unless (or (member parent load-path) + (member (file-name-as-directory parent) load-path)) + (push parent (cdr load-path)))) (require 'path-util)) (error " APEL modules are not found in %s. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 1d09cf0..c8b7792 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -366,14 +366,16 @@ last form in your `.gnus.el' file: \(gnus-agentize) This will modify the `gnus-setup-news-hook', and -`message-send-mail-function' variables, and install the Gnus agent +`message-send-mail-real-function' variables, and install the Gnus agent minor mode in all Gnus buffers." (interactive) (gnus-open-agent) (add-hook 'gnus-setup-news-hook 'gnus-agent-queue-setup) (unless gnus-agent-send-mail-function - (setq gnus-agent-send-mail-function message-send-mail-function - message-send-mail-function 'gnus-agent-send-mail)) + (setq gnus-agent-send-mail-function (or + message-send-mail-real-function + message-send-mail-function) + message-send-mail-real-function 'gnus-agent-send-mail)) (unless gnus-agent-covered-methods (setq gnus-agent-covered-methods (list gnus-select-method)))) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 2795f70..545f055 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -4247,7 +4247,9 @@ If no internal viewer is available, use an external viewer." "inline") (mm-attachment-override-p handle)))) (mm-automatic-display-p handle) - (or (mm-inlined-p handle) + (or (and + (mm-inlinable-p handle) + (mm-inlined-p handle)) (mm-automatic-external-display-p type))) (setq display t) (when (equal (mm-handle-media-supertype handle) "text") diff --git a/lisp/message.el b/lisp/message.el index 684ebe4..f7b7f43 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1470,6 +1470,9 @@ no, only reply back to the author." (defvar message-options nil "Some saved answers when sending message.") +(defvar message-send-mail-real-function nil + "Internal send mail function.") + (eval-and-compile (autoload 'message-setup-toolbar "messagexmas") (autoload 'mh-new-draft-name "mh-comp") @@ -3077,13 +3080,15 @@ This sub function is for exclusive use of `message-send-mail'." (delete-region (match-end 0) (std11-field-end)) (insert " " (message-make-message-id)))) (condition-case err - (funcall message-send-mail-function) + (funcall (or message-send-mail-real-function + message-send-mail-function)) (error (throw 'message-sending-mail-failure err)))))) nil) (condition-case err (progn - (funcall message-send-mail-function) + (funcall (or message-send-mail-real-function + message-send-mail-function)) nil) (error err)))) (when failure @@ -3157,7 +3162,8 @@ This sub function is for exclusive use of `message-send-mail'." (insert "\n") (widen) (mm-with-unibyte-current-buffer - (funcall message-send-mail-function))) + (funcall (or message-send-mail-real-function + message-send-mail-function)))) (setq n (+ n 1)) (setq p (pop plist)) (erase-buffer))) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 2a02fab..9b2312a 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -178,7 +178,9 @@ ("application/pkcs7-signature" ignore identity) ("multipart/alternative" ignore identity) ("multipart/mixed" ignore identity) - ("multipart/related" ignore identity)) + ("multipart/related" ignore identity) + ;; Default to displaying as text + (".*" mm-inline-text identity)) "Alist of media types/tests saying whether types can be displayed inline." :type '(repeat (list (string :tag "MIME type") (function :tag "Display function") @@ -192,8 +194,7 @@ "application/pkcs7-signature") "List of media types that are to be displayed inline. See also `mm-inline-media-tests', which says how to display a media -type inline. If no media test is defined, the default is to treat the -type as plain text." +type inline." :type '(repeat string) :group 'mime-display) @@ -545,7 +546,8 @@ external if displayed external." (mm-remove-part handle) (let* ((type (mm-handle-media-type handle)) (method (mailcap-mime-info type))) - (if (mm-inlined-p handle) + (if (and (mm-inlinable-p handle) + (mm-inlined-p handle)) (progn (forward-line 1) (mm-display-inline handle) @@ -748,7 +750,7 @@ external if displayed external." (defun mm-display-inline (handle) (let* ((type (mm-handle-media-type handle)) (function (cadr (mm-assoc-string-match mm-inline-media-tests type)))) - (funcall (or function #'mm-inline-text) handle) + (funcall function handle) (goto-char (point-min)))) (defun mm-assoc-string-match (alist type) @@ -768,8 +770,21 @@ external if displayed external." methods nil))) result)) +(defun mm-inlinable-p (handle) + "Say whether HANDLE can be displayed inline." + (let ((alist mm-inline-media-tests) + (type (mm-handle-media-type handle)) + test) + (while alist + (when (string-match (caar alist) type) + (setq test (caddar alist) + alist nil) + (setq test (funcall test handle))) + (pop alist)) + test)) + (defun mm-inlined-p (handle) - "Say whether the user wants HANDLE to be displayed automatically." + "Say whether the user wants HANDLE to be displayed inline." (let ((methods mm-inlined-types) (type (mm-handle-media-type handle)) method result) @@ -787,7 +802,8 @@ external if displayed external." ty) (catch 'found (while (setq ty (pop types)) - (when (string-match ty type) + (when (and (string-match ty type) + (mm-inlinable-p ty)) (throw 'found t)))))) (defun mm-inline-override-p (handle) diff --git a/lisp/mm-view.el b/lisp/mm-view.el index 4a92e80..2adeb8f 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -104,11 +104,14 @@ (and (boundp 'w3-meta-charset-content-type-regexp) (re-search-forward w3-meta-charset-content-type-regexp nil t))) - (setq charset (or (w3-coding-system-for-mime-charset - (buffer-substring-no-properties - (match-beginning 2) - (match-end 2))) - charset))) + (setq charset + (or (let ((bsubstr (buffer-substring-no-properties + (match-beginning 2) + (match-end 2)))) + (if (fboundp 'w3-coding-system-for-mime-charset) + (w3-coding-system-for-mime-charset bsubstr) + (mm-charset-to-coding-system bsubstr))) + charset))) (delete-region (point-min) (point-max)) (insert (mm-decode-string text charset)) (save-window-excursion diff --git a/lisp/nngateway.el b/lisp/nngateway.el index 65bd2cc..21b5a4b 100644 --- a/lisp/nngateway.el +++ b/lisp/nngateway.el @@ -65,7 +65,8 @@ parameter -- the gateway address.") (insert mail-header-separator "\n") (widen) (let (message-required-mail-headers) - (funcall message-send-mail-function)) + (funcall (or message-send-mail-real-function + message-send-mail-function))) t)))) ;;; Internal functions diff --git a/lisp/nnsoup.el b/lisp/nnsoup.el index 140fe5e..149926c 100644 --- a/lisp/nnsoup.el +++ b/lisp/nnsoup.el @@ -657,20 +657,20 @@ backend for the messages.") (and areas (car areas)))) (defvar nnsoup-old-functions - (list message-send-mail-function message-send-news-function)) + (list message-send-mail-real-function message-send-news-function)) ;;;###autoload (defun nnsoup-set-variables () "Use the SOUP methods for posting news and mailing mail." (interactive) (setq message-send-news-function 'nnsoup-request-post) - (setq message-send-mail-function 'nnsoup-request-mail)) + (setq message-send-mail-real-function 'nnsoup-request-mail)) ;;;###autoload (defun nnsoup-revert-variables () "Revert posting and mailing methods to the standard Emacs methods." (interactive) - (setq message-send-mail-function (car nnsoup-old-functions)) + (setq message-send-mail-real-function (car nnsoup-old-functions)) (setq message-send-news-function (cadr nnsoup-old-functions))) (defun nnsoup-store-reply (kind)