diff options
| author | Miles Bader | 2006-01-25 06:47:24 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-01-25 06:47:24 +0000 |
| commit | 7347faa822b5ea177df5b2ed7a2b7d79194f0bcc (patch) | |
| tree | c703c96ced89fb544e6d2fdcce4aad31853ea11c | |
| parent | 699ee5f57ac1154b1e8a7b6f0e56146d1db2e4f8 (diff) | |
| download | emacs-7347faa822b5ea177df5b2ed7a2b7d79194f0bcc.tar.gz emacs-7347faa822b5ea177df5b2ed7a2b7d79194f0bcc.zip | |
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
| -rw-r--r-- | lisp/gnus/ChangeLog | 38 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 21 | ||||
| -rw-r--r-- | lisp/gnus/mailcap.el | 7 | ||||
| -rw-r--r-- | lisp/gnus/mm-uu.el | 45 | ||||
| -rw-r--r-- | lisp/gnus/mm-view.el | 70 | ||||
| -rw-r--r-- | lisp/gnus/mml.el | 19 |
6 files changed, 150 insertions, 50 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index fb99c71c9c8..fbbf7281b69 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,41 @@ | |||
| 1 | 2006-01-25 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * mm-uu.el (mm-uu-dissect-text-parts): Ignore it if a given part | ||
| 4 | is dissected into a single part of which the type is the same as | ||
| 5 | the given one. | ||
| 6 | |||
| 7 | 2006-01-21 Kevin Ryde <user42@zip.com.au> | ||
| 8 | |||
| 9 | * mailcap.el (mailcap-parse-mailcap-extras): "test" key must go | ||
| 10 | into alists as symbol not string, since that's what | ||
| 11 | mailcap-viewer-passes-test and mailcap-mailcap-entry-passes-test | ||
| 12 | look for. | ||
| 13 | |||
| 14 | 2006-01-24 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 15 | |||
| 16 | * mm-uu.el (mm-uu-dissect-text-parts): Reduce the number of | ||
| 17 | recursive calls. | ||
| 18 | |||
| 19 | 2006-01-24 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 20 | |||
| 21 | * mm-view.el (mm-w3m-standalone-supports-m17n-p): New variable. | ||
| 22 | (mm-w3m-standalone-supports-m17n-p): New function. | ||
| 23 | (mm-inline-text-html-render-with-w3m-standalone): Use it to alter | ||
| 24 | w3m usage. | ||
| 25 | |||
| 26 | * gnus-art.el (gnus-article-wash-html-with-w3m-standalone): Use | ||
| 27 | mm-w3m-standalone-supports-m17n-p to alter w3m usage. | ||
| 28 | |||
| 29 | 2006-01-23 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 30 | |||
| 31 | * mm-uu.el (mm-uu-dissect-text-parts): Decode content transfer | ||
| 32 | encoding. | ||
| 33 | |||
| 34 | 2006-01-20 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 35 | |||
| 36 | * mml.el (mml-attach-file): Describe `description' in doc string. | ||
| 37 | (mml-menu): Add Emacs MIME manual and PGG manual. | ||
| 38 | |||
| 1 | 2006-01-19 Reiner Steib <Reiner.Steib@gmx.de> | 39 | 2006-01-19 Reiner Steib <Reiner.Steib@gmx.de> |
| 2 | 40 | ||
| 3 | * spam.el (spam-group-ham-mark-p, spam-group-spam-mark-p) | 41 | * spam.el (spam-group-ham-mark-p, spam-group-spam-mark-p) |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 92a4f09ded3..b51ceff29a9 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -2541,15 +2541,18 @@ charset defined in `gnus-summary-show-article-charset-alist' is used." | |||
| 2541 | 2541 | ||
| 2542 | (defun gnus-article-wash-html-with-w3m-standalone () | 2542 | (defun gnus-article-wash-html-with-w3m-standalone () |
| 2543 | "Wash the current buffer with w3m." | 2543 | "Wash the current buffer with w3m." |
| 2544 | (unless (mm-coding-system-p charset) | 2544 | (if (mm-w3m-standalone-supports-m17n-p) |
| 2545 | ;; The default. | 2545 | (progn |
| 2546 | (setq charset 'iso-8859-1)) | 2546 | (unless (mm-coding-system-p charset) ;; Bound by `article-wash-html'. |
| 2547 | (let ((coding-system-for-write charset) | 2547 | ;; The default. |
| 2548 | (coding-system-for-read charset)) | 2548 | (setq charset 'iso-8859-1)) |
| 2549 | (call-process-region | 2549 | (let ((coding-system-for-write charset) |
| 2550 | (point-min) (point-max) | 2550 | (coding-system-for-read charset)) |
| 2551 | "w3m" t t nil "-dump" "-T" "text/html" | 2551 | (call-process-region |
| 2552 | "-I" (symbol-name charset) "-O" (symbol-name charset)))) | 2552 | (point-min) (point-max) |
| 2553 | "w3m" t t nil "-dump" "-T" "text/html" | ||
| 2554 | "-I" (symbol-name charset) "-O" (symbol-name charset)))) | ||
| 2555 | (mm-inline-wash-with-stdin nil "w3m" "-dump" "-T" "text/html"))) | ||
| 2553 | 2556 | ||
| 2554 | (defun article-hide-list-identifiers () | 2557 | (defun article-hide-list-identifiers () |
| 2555 | "Remove list identifies from the Subject header. | 2558 | "Remove list identifies from the Subject header. |
diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index 166edb60f7a..80153645819 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el | |||
| @@ -528,7 +528,12 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus | |||
| 528 | (skip-chars-forward ";")) | 528 | (skip-chars-forward ";")) |
| 529 | (setq done t)))) | 529 | (setq done t)))) |
| 530 | (setq value (buffer-substring val-pos (point)))) | 530 | (setq value (buffer-substring val-pos (point)))) |
| 531 | (setq results (cons (cons name value) results)) | 531 | ;; `test' as symbol, others like "copiousoutput" and "needsx11" as |
| 532 | ;; strings | ||
| 533 | (setq results (cons (cons (if (string-equal name "test") | ||
| 534 | 'test | ||
| 535 | name) | ||
| 536 | value) results)) | ||
| 532 | (skip-chars-forward " \";\n\t")) | 537 | (skip-chars-forward " \";\n\t")) |
| 533 | results))) | 538 | results))) |
| 534 | 539 | ||
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index 2bebede4bfc..fa36582af01 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el | |||
| @@ -511,25 +511,40 @@ value of `mm-uu-text-plain-type'." | |||
| 511 | 511 | ||
| 512 | (defun mm-uu-dissect-text-parts (handle) | 512 | (defun mm-uu-dissect-text-parts (handle) |
| 513 | "Dissect text parts and put uu handles into HANDLE." | 513 | "Dissect text parts and put uu handles into HANDLE." |
| 514 | (let ((buffer (mm-handle-buffer handle)) | 514 | (let ((buffer (mm-handle-buffer handle))) |
| 515 | (case-fold-search t) | ||
| 516 | type children) | ||
| 517 | (cond ((stringp buffer) | 515 | (cond ((stringp buffer) |
| 518 | (dolist (elem (cdr handle)) | 516 | (dolist (elem (cdr handle)) |
| 519 | (mm-uu-dissect-text-parts elem))) | 517 | (mm-uu-dissect-text-parts elem))) |
| 520 | ((bufferp buffer) | 518 | ((bufferp buffer) |
| 521 | (when (and (setq type (mm-handle-media-type handle)) | 519 | (let ((type (mm-handle-media-type handle)) |
| 522 | (stringp type) | 520 | (case-fold-search t) ;; string-match |
| 523 | ;; Mutt still uses application/pgp even though | 521 | encoding children) |
| 524 | ;; it has already been withdrawn. | 522 | (when (and |
| 525 | (string-match "\\`text/\\|\\`application/pgp\\'" type) | 523 | (stringp type) |
| 526 | (with-current-buffer buffer | 524 | ;; Mutt still uses application/pgp even though |
| 527 | (setq children | 525 | ;; it has already been withdrawn. |
| 528 | (mm-uu-dissect t (mm-handle-type handle))))) | 526 | (string-match "\\`text/\\|\\`application/pgp\\'" type) |
| 529 | (kill-buffer buffer) | 527 | (setq children |
| 530 | (setcar handle (car children)) | 528 | (with-current-buffer buffer |
| 531 | (setcdr handle (cdr children)) | 529 | (if (setq encoding (mm-handle-encoding handle)) |
| 532 | (mm-uu-dissect-text-parts handle))) | 530 | ;; Inherit the multibyteness of the `buffer'. |
| 531 | (with-temp-buffer | ||
| 532 | (insert-buffer-substring buffer) | ||
| 533 | (mm-decode-content-transfer-encoding | ||
| 534 | encoding type) | ||
| 535 | (mm-uu-dissect t (mm-handle-type handle))) | ||
| 536 | (mm-uu-dissect t (mm-handle-type handle)))))) | ||
| 537 | ;; Ignore it if a given part is dissected into a single | ||
| 538 | ;; part of which the type is the same as the given one. | ||
| 539 | (if (and (<= (length children) 2) | ||
| 540 | (string-equal (mm-handle-media-type (cadr children)) | ||
| 541 | type)) | ||
| 542 | (kill-buffer (mm-handle-buffer (cadr children))) | ||
| 543 | (kill-buffer buffer) | ||
| 544 | (setcdr handle (cdr children)) | ||
| 545 | (setcar handle (car children)) ;; "multipart/mixed" | ||
| 546 | (dolist (elem (cdr children)) | ||
| 547 | (mm-uu-dissect-text-parts elem)))))) | ||
| 533 | (t | 548 | (t |
| 534 | (dolist (elem handle) | 549 | (dolist (elem handle) |
| 535 | (mm-uu-dissect-text-parts elem)))))) | 550 | (mm-uu-dissect-text-parts elem)))))) |
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 645e960b535..73cab0a5676 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el | |||
| @@ -262,29 +262,57 @@ | |||
| 262 | (delete-region ,(point-min-marker) | 262 | (delete-region ,(point-min-marker) |
| 263 | ,(point-max-marker))))))))) | 263 | ,(point-max-marker))))))))) |
| 264 | 264 | ||
| 265 | (defvar mm-w3m-standalone-supports-m17n-p (if (featurep 'mule) 'undecided) | ||
| 266 | "*T means the w3m command supports the m17n feature.") | ||
| 267 | |||
| 268 | (defun mm-w3m-standalone-supports-m17n-p () | ||
| 269 | "Say whether the w3m command supports the m17n feature." | ||
| 270 | (cond ((eq mm-w3m-standalone-supports-m17n-p t) t) | ||
| 271 | ((eq mm-w3m-standalone-supports-m17n-p nil) nil) | ||
| 272 | ((not (featurep 'mule)) (setq mm-w3m-standalone-supports-m17n-p nil)) | ||
| 273 | ((condition-case nil | ||
| 274 | (let ((coding-system-for-write 'iso-2022-jp) | ||
| 275 | (coding-system-for-read 'iso-2022-jp) | ||
| 276 | (str (mm-decode-coding-string "\ | ||
| 277 | \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))) | ||
| 278 | (mm-with-multibyte-buffer | ||
| 279 | (insert str) | ||
| 280 | (call-process-region | ||
| 281 | (point-min) (point-max) "w3m" t t nil "-dump" | ||
| 282 | "-T" "text/html" "-I" "iso-2022-jp" "-O" "iso-2022-jp") | ||
| 283 | (goto-char (point-min)) | ||
| 284 | (search-forward str nil t))) | ||
| 285 | (error nil)) | ||
| 286 | (setq mm-w3m-standalone-supports-m17n-p t)) | ||
| 287 | (t | ||
| 288 | ;;(message "You had better upgrade your w3m command") | ||
| 289 | (setq mm-w3m-standalone-supports-m17n-p nil)))) | ||
| 290 | |||
| 265 | (defun mm-inline-text-html-render-with-w3m-standalone (handle) | 291 | (defun mm-inline-text-html-render-with-w3m-standalone (handle) |
| 266 | "Render a text/html part using w3m." | 292 | "Render a text/html part using w3m." |
| 267 | (let ((source (mm-get-part handle)) | 293 | (if (mm-w3m-standalone-supports-m17n-p) |
| 268 | (charset (mail-content-type-get (mm-handle-type handle) 'charset)) | 294 | (let ((source (mm-get-part handle)) |
| 269 | cs) | 295 | (charset (mail-content-type-get (mm-handle-type handle) 'charset)) |
| 270 | (unless (and charset | 296 | cs) |
| 271 | (setq cs (mm-charset-to-coding-system charset)) | 297 | (unless (and charset |
| 272 | (not (eq cs 'ascii))) | 298 | (setq cs (mm-charset-to-coding-system charset)) |
| 273 | ;; The default. | 299 | (not (eq cs 'ascii))) |
| 274 | (setq charset "iso-8859-1" | 300 | ;; The default. |
| 275 | cs 'iso-8859-1)) | 301 | (setq charset "iso-8859-1" |
| 276 | (mm-insert-inline | 302 | cs 'iso-8859-1)) |
| 277 | handle | 303 | (mm-insert-inline |
| 278 | (mm-with-unibyte-buffer | 304 | handle |
| 279 | (insert source) | 305 | (mm-with-unibyte-buffer |
| 280 | (mm-enable-multibyte) | 306 | (insert source) |
| 281 | (let ((coding-system-for-write 'binary) | 307 | (mm-enable-multibyte) |
| 282 | (coding-system-for-read cs)) | 308 | (let ((coding-system-for-write 'binary) |
| 283 | (call-process-region | 309 | (coding-system-for-read cs)) |
| 284 | (point-min) (point-max) | 310 | (call-process-region |
| 285 | "w3m" t t nil "-dump" "-T" "text/html" | 311 | (point-min) (point-max) |
| 286 | "-I" charset "-O" charset)) | 312 | "w3m" t t nil "-dump" "-T" "text/html" |
| 287 | (buffer-string))))) | 313 | "-I" charset "-O" charset)) |
| 314 | (buffer-string)))) | ||
| 315 | (mm-inline-render-with-stdin handle nil "w3m" "-dump" "-T" "text/html"))) | ||
| 288 | 316 | ||
| 289 | (defun mm-links-remove-leading-blank () | 317 | (defun mm-links-remove-leading-blank () |
| 290 | ;; Delete the annoying three spaces preceding each line of links | 318 | ;; Delete the annoying three spaces preceding each line of links |
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 8b00313fb92..90f7c5f09dd 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | (autoload 'gnus-add-minor-mode "gnus-ems") | 38 | (autoload 'gnus-add-minor-mode "gnus-ems") |
| 39 | (autoload 'gnus-make-local-hook "gnus-util") | 39 | (autoload 'gnus-make-local-hook "gnus-util") |
| 40 | (autoload 'message-fetch-field "message") | 40 | (autoload 'message-fetch-field "message") |
| 41 | (autoload 'message-info "message") | ||
| 41 | (autoload 'fill-flowed-encode "flow-fill") | 42 | (autoload 'fill-flowed-encode "flow-fill") |
| 42 | (autoload 'message-posting-charset "message")) | 43 | (autoload 'message-posting-charset "message")) |
| 43 | 44 | ||
| @@ -917,7 +918,14 @@ If HANDLES is non-nil, use it instead reparsing the buffer." | |||
| 917 | ;;["Narrow" mml-narrow-to-part t] | 918 | ;;["Narrow" mml-narrow-to-part t] |
| 918 | ["Quote MML" mml-quote-region t] | 919 | ["Quote MML" mml-quote-region t] |
| 919 | ["Validate MML" mml-validate t] | 920 | ["Validate MML" mml-validate t] |
| 920 | ["Preview" mml-preview t])) | 921 | ["Preview" mml-preview t] |
| 922 | "----" | ||
| 923 | ["Emacs MIME manual" (lambda () (interactive) (message-info 4)) | ||
| 924 | ,@(if (featurep 'xemacs) '(t) | ||
| 925 | '(:help "Display the Emacs MIME manual"))] | ||
| 926 | ["PGG manual" (lambda () (interactive) (message-info 16)) | ||
| 927 | ,@(if (featurep 'xemacs) '(t) | ||
| 928 | '(:help "Display the PGG manual"))])) | ||
| 921 | 929 | ||
| 922 | (defvar mml-mode nil | 930 | (defvar mml-mode nil |
| 923 | "Minor mode for editing MML.") | 931 | "Minor mode for editing MML.") |
| @@ -1036,9 +1044,12 @@ See Info node `(emacs-mime)Composing'. | |||
| 1036 | The file is not inserted or encoded until you send the message with | 1044 | The file is not inserted or encoded until you send the message with |
| 1037 | `\\[message-send-and-exit]' or `\\[message-send]'. | 1045 | `\\[message-send-and-exit]' or `\\[message-send]'. |
| 1038 | 1046 | ||
| 1039 | FILE is the name of the file to attach. TYPE is its content-type, a | 1047 | FILE is the name of the file to attach. TYPE is its |
| 1040 | string of the form \"type/subtype\". DESCRIPTION is a one-line | 1048 | content-type, a string of the form \"type/subtype\". DESCRIPTION |
| 1041 | description of the attachment." | 1049 | is a one-line description of the attachment. The DISPOSITION |
| 1050 | specifies how the attachment is intended to be displayed. It can | ||
| 1051 | be either \"inline\" (displayed automatically within the message | ||
| 1052 | body) or \"attachment\" (separate from the body)." | ||
| 1042 | (interactive | 1053 | (interactive |
| 1043 | (let* ((file (mml-minibuffer-read-file "Attach file: ")) | 1054 | (let* ((file (mml-minibuffer-read-file "Attach file: ")) |
| 1044 | (type (mml-minibuffer-read-type file)) | 1055 | (type (mml-minibuffer-read-type file)) |