1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-17 03:10:58 -08:00

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-14

Merge from gnus--rel--5.10

Patches applied:

 * gnus--rel--5.10  (patch 4-7)

   - Update from CVS
This commit is contained in:
Miles Bader 2006-01-25 06:47:24 +00:00
parent 699ee5f57a
commit 7347faa822
6 changed files with 150 additions and 50 deletions

View file

@ -1,3 +1,41 @@
2006-01-25 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-uu.el (mm-uu-dissect-text-parts): Ignore it if a given part
is dissected into a single part of which the type is the same as
the given one.
2006-01-21 Kevin Ryde <user42@zip.com.au>
* mailcap.el (mailcap-parse-mailcap-extras): "test" key must go
into alists as symbol not string, since that's what
mailcap-viewer-passes-test and mailcap-mailcap-entry-passes-test
look for.
2006-01-24 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-uu.el (mm-uu-dissect-text-parts): Reduce the number of
recursive calls.
2006-01-24 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-view.el (mm-w3m-standalone-supports-m17n-p): New variable.
(mm-w3m-standalone-supports-m17n-p): New function.
(mm-inline-text-html-render-with-w3m-standalone): Use it to alter
w3m usage.
* gnus-art.el (gnus-article-wash-html-with-w3m-standalone): Use
mm-w3m-standalone-supports-m17n-p to alter w3m usage.
2006-01-23 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-uu.el (mm-uu-dissect-text-parts): Decode content transfer
encoding.
2006-01-20 Reiner Steib <Reiner.Steib@gmx.de>
* mml.el (mml-attach-file): Describe `description' in doc string.
(mml-menu): Add Emacs MIME manual and PGG manual.
2006-01-19 Reiner Steib <Reiner.Steib@gmx.de> 2006-01-19 Reiner Steib <Reiner.Steib@gmx.de>
* spam.el (spam-group-ham-mark-p, spam-group-spam-mark-p) * spam.el (spam-group-ham-mark-p, spam-group-spam-mark-p)

View file

@ -2541,7 +2541,9 @@ charset defined in `gnus-summary-show-article-charset-alist' is used."
(defun gnus-article-wash-html-with-w3m-standalone () (defun gnus-article-wash-html-with-w3m-standalone ()
"Wash the current buffer with w3m." "Wash the current buffer with w3m."
(unless (mm-coding-system-p charset) (if (mm-w3m-standalone-supports-m17n-p)
(progn
(unless (mm-coding-system-p charset) ;; Bound by `article-wash-html'.
;; The default. ;; The default.
(setq charset 'iso-8859-1)) (setq charset 'iso-8859-1))
(let ((coding-system-for-write charset) (let ((coding-system-for-write charset)
@ -2550,6 +2552,7 @@ charset defined in `gnus-summary-show-article-charset-alist' is used."
(point-min) (point-max) (point-min) (point-max)
"w3m" t t nil "-dump" "-T" "text/html" "w3m" t t nil "-dump" "-T" "text/html"
"-I" (symbol-name charset) "-O" (symbol-name charset)))) "-I" (symbol-name charset) "-O" (symbol-name charset))))
(mm-inline-wash-with-stdin nil "w3m" "-dump" "-T" "text/html")))
(defun article-hide-list-identifiers () (defun article-hide-list-identifiers ()
"Remove list identifies from the Subject header. "Remove list identifies from the Subject header.

View file

@ -528,7 +528,12 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus
(skip-chars-forward ";")) (skip-chars-forward ";"))
(setq done t)))) (setq done t))))
(setq value (buffer-substring val-pos (point)))) (setq value (buffer-substring val-pos (point))))
(setq results (cons (cons name value) results)) ;; `test' as symbol, others like "copiousoutput" and "needsx11" as
;; strings
(setq results (cons (cons (if (string-equal name "test")
'test
name)
value) results))
(skip-chars-forward " \";\n\t")) (skip-chars-forward " \";\n\t"))
results))) results)))

View file

@ -511,25 +511,40 @@ value of `mm-uu-text-plain-type'."
(defun mm-uu-dissect-text-parts (handle) (defun mm-uu-dissect-text-parts (handle)
"Dissect text parts and put uu handles into HANDLE." "Dissect text parts and put uu handles into HANDLE."
(let ((buffer (mm-handle-buffer handle)) (let ((buffer (mm-handle-buffer handle)))
(case-fold-search t)
type children)
(cond ((stringp buffer) (cond ((stringp buffer)
(dolist (elem (cdr handle)) (dolist (elem (cdr handle))
(mm-uu-dissect-text-parts elem))) (mm-uu-dissect-text-parts elem)))
((bufferp buffer) ((bufferp buffer)
(when (and (setq type (mm-handle-media-type handle)) (let ((type (mm-handle-media-type handle))
(case-fold-search t) ;; string-match
encoding children)
(when (and
(stringp type) (stringp type)
;; Mutt still uses application/pgp even though ;; Mutt still uses application/pgp even though
;; it has already been withdrawn. ;; it has already been withdrawn.
(string-match "\\`text/\\|\\`application/pgp\\'" type) (string-match "\\`text/\\|\\`application/pgp\\'" type)
(with-current-buffer buffer
(setq children (setq children
(mm-uu-dissect t (mm-handle-type handle))))) (with-current-buffer buffer
(if (setq encoding (mm-handle-encoding handle))
;; Inherit the multibyteness of the `buffer'.
(with-temp-buffer
(insert-buffer-substring buffer)
(mm-decode-content-transfer-encoding
encoding type)
(mm-uu-dissect t (mm-handle-type handle)))
(mm-uu-dissect t (mm-handle-type handle))))))
;; Ignore it if a given part is dissected into a single
;; part of which the type is the same as the given one.
(if (and (<= (length children) 2)
(string-equal (mm-handle-media-type (cadr children))
type))
(kill-buffer (mm-handle-buffer (cadr children)))
(kill-buffer buffer) (kill-buffer buffer)
(setcar handle (car children))
(setcdr handle (cdr children)) (setcdr handle (cdr children))
(mm-uu-dissect-text-parts handle))) (setcar handle (car children)) ;; "multipart/mixed"
(dolist (elem (cdr children))
(mm-uu-dissect-text-parts elem))))))
(t (t
(dolist (elem handle) (dolist (elem handle)
(mm-uu-dissect-text-parts elem)))))) (mm-uu-dissect-text-parts elem))))))

View file

@ -262,8 +262,35 @@
(delete-region ,(point-min-marker) (delete-region ,(point-min-marker)
,(point-max-marker))))))))) ,(point-max-marker)))))))))
(defvar mm-w3m-standalone-supports-m17n-p (if (featurep 'mule) 'undecided)
"*T means the w3m command supports the m17n feature.")
(defun mm-w3m-standalone-supports-m17n-p ()
"Say whether the w3m command supports the m17n feature."
(cond ((eq mm-w3m-standalone-supports-m17n-p t) t)
((eq mm-w3m-standalone-supports-m17n-p nil) nil)
((not (featurep 'mule)) (setq mm-w3m-standalone-supports-m17n-p nil))
((condition-case nil
(let ((coding-system-for-write 'iso-2022-jp)
(coding-system-for-read 'iso-2022-jp)
(str (mm-decode-coding-string "\
\e$B#D#o#e#s!!#w#3#m!!#s#u#p#p#o#r#t#s!!#m#1#7#n!)\e(B" 'iso-2022-jp)))
(mm-with-multibyte-buffer
(insert str)
(call-process-region
(point-min) (point-max) "w3m" t t nil "-dump"
"-T" "text/html" "-I" "iso-2022-jp" "-O" "iso-2022-jp")
(goto-char (point-min))
(search-forward str nil t)))
(error nil))
(setq mm-w3m-standalone-supports-m17n-p t))
(t
;;(message "You had better upgrade your w3m command")
(setq mm-w3m-standalone-supports-m17n-p nil))))
(defun mm-inline-text-html-render-with-w3m-standalone (handle) (defun mm-inline-text-html-render-with-w3m-standalone (handle)
"Render a text/html part using w3m." "Render a text/html part using w3m."
(if (mm-w3m-standalone-supports-m17n-p)
(let ((source (mm-get-part handle)) (let ((source (mm-get-part handle))
(charset (mail-content-type-get (mm-handle-type handle) 'charset)) (charset (mail-content-type-get (mm-handle-type handle) 'charset))
cs) cs)
@ -284,7 +311,8 @@
(point-min) (point-max) (point-min) (point-max)
"w3m" t t nil "-dump" "-T" "text/html" "w3m" t t nil "-dump" "-T" "text/html"
"-I" charset "-O" charset)) "-I" charset "-O" charset))
(buffer-string))))) (buffer-string))))
(mm-inline-render-with-stdin handle nil "w3m" "-dump" "-T" "text/html")))
(defun mm-links-remove-leading-blank () (defun mm-links-remove-leading-blank ()
;; Delete the annoying three spaces preceding each line of links ;; Delete the annoying three spaces preceding each line of links

View file

@ -38,6 +38,7 @@
(autoload 'gnus-add-minor-mode "gnus-ems") (autoload 'gnus-add-minor-mode "gnus-ems")
(autoload 'gnus-make-local-hook "gnus-util") (autoload 'gnus-make-local-hook "gnus-util")
(autoload 'message-fetch-field "message") (autoload 'message-fetch-field "message")
(autoload 'message-info "message")
(autoload 'fill-flowed-encode "flow-fill") (autoload 'fill-flowed-encode "flow-fill")
(autoload 'message-posting-charset "message")) (autoload 'message-posting-charset "message"))
@ -917,7 +918,14 @@ If HANDLES is non-nil, use it instead reparsing the buffer."
;;["Narrow" mml-narrow-to-part t] ;;["Narrow" mml-narrow-to-part t]
["Quote MML" mml-quote-region t] ["Quote MML" mml-quote-region t]
["Validate MML" mml-validate t] ["Validate MML" mml-validate t]
["Preview" mml-preview t])) ["Preview" mml-preview t]
"----"
["Emacs MIME manual" (lambda () (interactive) (message-info 4))
,@(if (featurep 'xemacs) '(t)
'(:help "Display the Emacs MIME manual"))]
["PGG manual" (lambda () (interactive) (message-info 16))
,@(if (featurep 'xemacs) '(t)
'(:help "Display the PGG manual"))]))
(defvar mml-mode nil (defvar mml-mode nil
"Minor mode for editing MML.") "Minor mode for editing MML.")
@ -1036,9 +1044,12 @@ See Info node `(emacs-mime)Composing'.
The file is not inserted or encoded until you send the message with The file is not inserted or encoded until you send the message with
`\\[message-send-and-exit]' or `\\[message-send]'. `\\[message-send-and-exit]' or `\\[message-send]'.
FILE is the name of the file to attach. TYPE is its content-type, a FILE is the name of the file to attach. TYPE is its
string of the form \"type/subtype\". DESCRIPTION is a one-line content-type, a string of the form \"type/subtype\". DESCRIPTION
description of the attachment." is a one-line description of the attachment. The DISPOSITION
specifies how the attachment is intended to be displayed. It can
be either \"inline\" (displayed automatically within the message
body) or \"attachment\" (separate from the body)."
(interactive (interactive
(let* ((file (mml-minibuffer-read-file "Attach file: ")) (let* ((file (mml-minibuffer-read-file "Attach file: "))
(type (mml-minibuffer-read-type file)) (type (mml-minibuffer-read-type file))