+Tue Nov 24 10:43:06 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Pterodactyl Gnus v0.54 is released.
+
+1998-11-24 11:21:32 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-sum.el (gnus-newsgroup-default-charset-alist): Note fj.
+
+1998-11-24 11:14:54 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mm-decode.el (mm-save-part): Unquote.
+
+1998-11-24 11:14:39 Matt Armstrong <matta@geoworks.com>
+
+ * mm-decode.el (mm-save-part): Bind coding system for write.
+
+1998-11-24 10:42:30 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-art.el (gnus-article-mode-line-format): New default.
+ (gnus-article-mime-part-status): New function.
+
+ * message.el (message-send-news): Check the body syntax before
+ encoding.
+
+ * gnus-art.el (gnus-unbuttonized-mime-type): New function.
+ (gnus-mime-display-single): Use it.
+ (gnus-mime-display-alternative): Ditto.
+
+ * mm-decode.el: Check for whether we are running under a term.
+
+1998-11-22 08:12:25 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mm-decode.el (mm-preferred-alternative): Default to first
+ alternative.
+ (mm-preferred-alternative): No, we dont.
+
+Tue Nov 24 03:01:48 1998 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-decode.el (mm-display-external): Use binary instead of
+ no-conversion.
+ * gnus-agent.el (gnus-agent-file-coding-system): Ditto.
+ * nnheader.el (nnheader-file-coding-system): Ditto.
+ * mm-util.el (mm-with-unibyte-buffer): Use binary instead of nil.
+
+Mon Nov 23 01:51:57 1998 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-sum.el (gnus-newsgroup-setup-default-charset): Use group
+ name without method.
+
+Mon Nov 23 01:26:40 1998 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-sum.el (gnus-newsgroup-default-charset): Rename
+ coding-system -> default-charset.
+ (gnus-newsgroup-default-charset-alist): Ditto.
+ (gnus-summary-local-variables): Ditto.
+ (gnus-set-global-variables): Ditto.
+ (gnus-get-newsgroup-headers): Ditto.
+ (gnus-summary-from-or-to-or-newsgroups): Ditto.
+ (gnus-get-newsgroup-headers-xover): Ditto.
+ (gnus-newsgroup-setup-default-charset): Ditto.
+ (article-decode-mime-words): Ditto.
+ (article-decode-charset): Ditto.
+ (article-decode-encoded-words): Ditto.
+ (article-de-quoted-unreadable): Ditto.
+ (gnus-mime-view-all-parts): Ditto.
+ (gnus-mime-externalize-part): Ditto.
+ (gnus-mm-display-part): Ditto.
+ (gnus-mime-display-single): Ditto.
+ (gnus-mime-display-alternative): Ditto.
+ * lpath.el : Ditto.
+
+Mon Nov 23 00:54:33 1998 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * rfc2047.el (rfc2047-decode-region): Do not decode nil charset.
+ * gnus-art.el (article-decode-charset): Overlay
+ rfc2047-default-charset.
+ * message.el (message-draft-coding-system): New variable.
+ (message-set-auto-save-file-name): Use message-draft-coding-system.
+ * nndraft.el (nndraft-request-article): Ditto.
+ * gnus-start.el (gnus-start-draft-setup): Set charset nil.
+ * gnus-agent.el (gnus-agent-queue-setup): Ditto.
+
+Sun Nov 22 04:42:22 1998 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-uu.el (mm-uu-test): New function.
+ (mm-uu-dissect): Inherit charset and cte from head.
+ * gnus-art.el (article-decode-charset): Use mm-uu-test.
+
Sat Nov 21 09:57:01 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.53 is released.
(defvar gnus-agent-spam-hashtb nil)
(defvar gnus-agent-file-name nil)
(defvar gnus-agent-send-mail-function nil)
-(defvar gnus-agent-file-coding-system 'no-conversion)
+(defvar gnus-agent-file-coding-system 'binary)
(defconst gnus-agent-scoreable-headers
(list
(gnus-request-create-group "queue" '(nndraft ""))
(let ((gnus-level-default-subscribed 1))
(gnus-subscribe-group "nndraft:queue" nil '(nndraft "")))
+ (gnus-group-set-parameter "nndraft:queue" 'charset "nil")
(gnus-group-set-parameter
"nndraft:queue" 'gnus-dummy '((gnus-draft-mode)))))
:type 'regexp
:group 'gnus-article-various)
-(defcustom gnus-article-mode-line-format "Gnus: %g %S"
+(defcustom gnus-article-mode-line-format "Gnus: %g %S%m"
"*The format specification for the article mode line.
See `gnus-summary-mode-line-format' for a closer description."
:type 'string
;;; Internal variables
+(defvar gnus-article-mime-handle-alist-1 nil)
(defvar gnus-treatment-function-alist
'((gnus-treat-body-highlight-signature gnus-article-highlight-signature nil)
))
(defvar gnus-save-article-buffer nil)
(defvar gnus-article-mode-line-format-alist
- (nconc '((?w (gnus-article-wash-status) ?s))
+ (nconc '((?w (gnus-article-wash-status) ?s)
+ (?m (gnus-article-mime-part-status) ?s))
gnus-summary-mode-line-format-alist))
(defvar gnus-number-of-articles-to-be-saved nil)
(set-buffer gnus-article-buffer)
(let ((inhibit-point-motion-hooks t)
buffer-read-only
- (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (rfc2047-default-charset gnus-newsgroup-default-charset)
(mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(mail-decode-encoded-word-region (point-min) (point-max)))))
(prompt
(mm-read-coding-system "Charset to decode: "))
(ctl
- (mail-content-type-get ctl 'charset))
- (t
- gnus-newsgroup-coding-system)))
+ (mail-content-type-get ctl 'charset))))
+ (rfc2047-default-charset gnus-newsgroup-default-charset)
(mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced)
buffer-read-only)
(goto-char (point-max))
(widen)
(forward-line 1)
(narrow-to-region (point) (point-max))
- (when (or (not ctl)
- (equal (car ctl) "text/plain"))
+ (when (and (or (not ctl)
+ (equal (car ctl) "text/plain"))
+ (not (mm-uu-test)))
(mm-decode-body
charset (and cte (intern (downcase
(gnus-strip-whitespace cte))))
(let ((buffer-read-only nil)
(type (gnus-fetch-field "content-transfer-encoding"))
(charset
- (or gnus-newsgroup-coding-system mm-default-coding-system))
+ (or gnus-newsgroup-default-charset mm-default-coding-system))
(mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(when (or force
(and type (string-match "quoted-printable" (downcase type))))
(gnus-configure-windows 'summary)
(gnus-configure-windows 'article))
(gnus-set-global-variables))
- (gnus-set-mode-line 'article))
+ (let ((gnus-article-mime-handle-alist-1
+ gnus-article-mime-handle-alist))
+ (gnus-set-mode-line 'article)))
;; The result from the `request' was an actual article -
;; or at least some text that is now displayed in the
;; article buffer.
(when gnus-break-pages
(gnus-narrow-to-page)
t)))
- (gnus-set-mode-line 'article)
+ (let ((gnus-article-mime-handle-alist-1
+ gnus-article-mime-handle-alist))
+ (gnus-set-mode-line 'article))
(gnus-configure-windows 'article)
(article-goto-body)
(set-window-point (get-buffer-window (current-buffer)) (point))
(gnus-mime-externalize-part "e" "View Externally")
(gnus-mime-pipe-part "|" "Pipe To Command...")))
+(defun gnus-article-mime-part-status ()
+ (if gnus-article-mime-handle-alist-1
+ (format " (%d parts)" (length gnus-article-mime-handle-alist-1))
+ ""))
+
(defvar gnus-mime-button-map nil)
(unless gnus-mime-button-map
(setq gnus-mime-button-map (make-sparse-keymap))
(interactive)
(gnus-article-check-buffer)
(let ((handles gnus-article-mime-handles)
- (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (rfc2047-default-charset gnus-newsgroup-default-charset)
(mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(while handles
(mm-display-part (pop handles)))))
(url-standalone-mode (not gnus-plugged)))
(mm-interactively-view-part data)))
-(defun gnus-mime-copy-part ()
+(defun gnus-mime-copy-part (&optional handle)
"Put the the MIME part under point into a new buffer."
(interactive)
(gnus-article-check-buffer)
- (let* ((handle (get-text-property (point) 'gnus-data))
+ (let* ((handle (or handle (get-text-property (point) 'gnus-data)))
(contents (mm-get-part handle))
(buffer (generate-new-buffer
(file-name-nondirectory
(defun gnus-mime-inline-part (&optional charset)
"Insert the MIME part under point into the current buffer."
- (interactive "P") ; For compatible reason, not using "z".
+ (interactive "P") ; For compatibility reasons we are not using "z".
(gnus-article-check-buffer)
(let* ((data (get-text-property (point) 'gnus-data))
(contents (mm-get-part data))
(mm-insert-inline data contents)
(goto-char b))))
-(defun gnus-mime-externalize-part ()
+(defun gnus-mime-externalize-part (&optional handle)
"Insert the MIME part under point into the current buffer."
(interactive)
(gnus-article-check-buffer)
- (let* ((handle (get-text-property (point) 'gnus-data))
+ (let* ((handle (or handle (get-text-property (point) 'gnus-data)))
(url-standalone-mode (not gnus-plugged))
(mm-user-display-methods nil)
- (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (rfc2047-default-charset gnus-newsgroup-default-charset)
(mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(if (mm-handle-undisplayer handle)
(mm-remove-part handle)
(mm-display-part handle))))
+(defun gnus-article-part-wrapper (n function)
+ (save-current-buffer
+ (set-buffer gnus-article-buffer)
+ (when (> n (length gnus-article-mime-handle-alist))
+ (error "No such part"))
+ (let ((handle (cdr (assq n gnus-article-mime-handle-alist))))
+ (funcall function handle))))
+
+(defun gnus-article-pipe-part (n)
+ "Pipe MIME part N, which is the numerical prefix."
+ (interactive "p")
+ (gnus-article-part-wrapper n 'mm-pipe-part))
+
+(defun gnus-article-save-part (n)
+ "Save MIME part N, which is the numerical prefix."
+ (interactive "p")
+ (gnus-article-part-wrapper n 'mm-save-part))
+
+(defun gnus-article-interactively-view-part (n)
+ "Pipe MIME part N, which is the numerical prefix."
+ (interactive "p")
+ (gnus-article-part-wrapper n 'mm-interactively-view-part))
+
+(defun gnus-article-copy-part (n)
+ "Pipe MIME part N, which is the numerical prefix."
+ (interactive "p")
+ (gnus-article-part-wrapper n 'gnus-mime-copy-part))
+
+(defun gnus-article-externalize-part (n)
+ "Pipe MIME part N, which is the numerical prefix."
+ (interactive "p")
+ (gnus-article-part-wrapper n 'gnus-mime-externalize-part))
+
(defun gnus-article-view-part (n)
"View MIME part N, which is the numerical prefix."
(interactive "p")
handle id (list (not (mm-handle-displayed-p handle))))
(prog1
(let ((window (selected-window))
- (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (rfc2047-default-charset gnus-newsgroup-default-charset)
(mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(save-excursion
(unwind-protect
(let ((id (1+ (length gnus-article-mime-handle-alist))))
(push (cons id handle) gnus-article-mime-handle-alist)
(when (or (not display)
- (not (catch 'found
- (let ((types gnus-unbuttonized-mime-types))
- (while types
- (when (string-match (pop types) type)
- (throw 'found t)))))))
+ (not (gnus-unbuttonized-mime-type-p type)))
(gnus-article-insert-newline)
(gnus-insert-mime-button
handle id (list (or display
(cond
(display
(forward-line -2)
- (let ((rfc2047-default-charset gnus-newsgroup-coding-system)
+ (let ((rfc2047-default-charset gnus-newsgroup-default-charset)
(mm-charset-iso-8859-1-forced
gnus-newsgroup-iso-8859-1-forced))
(mm-display-part handle t))
(mm-insert-inline handle (mm-get-part handle))
(goto-char (point-max))))))))
+(defun gnus-unbuttonized-mime-type-p (type)
+ "Say whether TYPE is to be unbuttonized."
+ (catch 'found
+ (let ((types gnus-unbuttonized-mime-types))
+ (while types
+ (when (string-match (pop types) type)
+ (throw 'found t))))))
+
(defun gnus-article-insert-newline ()
"Insert a newline, but mark it as undeletable."
(gnus-put-text-property
(save-window-excursion
(save-restriction
(when ibegend
- (narrow-to-region (car ibegend) (cdr ibegend))
+ (narrow-to-region (car ibegend)
+ (or (cdr ibegend)
+ (progn
+ (goto-char (car ibegend))
+ (forward-line 2)
+ (point))))
(delete-region (point-min) (point-max))
(mm-remove-parts handles))
(setq begend (list (point-marker)))
;; Do the toggle.
(unless (setq not-pref (cadr (member preferred ihandles)))
(setq not-pref (car ihandles)))
- (gnus-add-text-properties
- (setq from (point))
- (progn
- (insert (format "%d. " id))
- (point))
- `(gnus-callback
- (lambda (handles)
- (unless ,(not ibegend)
- (setq gnus-article-mime-handle-alist
- ',gnus-article-mime-handle-alist))
- (gnus-mime-display-alternative
- ',ihandles ',not-pref ',begend ,id))
- local-map ,gnus-mime-button-map
- ,gnus-mouse-face-prop ,gnus-article-mouse-face
- face ,gnus-article-button-face
- keymap ,gnus-mime-button-map
- gnus-part ,id
- gnus-data ,handle))
- (widget-convert-button 'link from (point)
- :action 'gnus-widget-press-button
- :button-keymap gnus-widget-button-keymap)
- ;; Do the handles
- (while (setq handle (pop handles))
+ (when (or ibegend
+ (not (gnus-unbuttonized-mime-type-p
+ "multipart/alternative")))
(gnus-add-text-properties
(setq from (point))
(progn
- (insert (format "[%c] %-18s"
- (if (equal handle preferred) ?* ? )
- (if (stringp (car handle))
- (car handle)
- (car (mm-handle-type handle)))))
+ (insert (format "%d. " id))
(point))
`(gnus-callback
(lambda (handles)
(setq gnus-article-mime-handle-alist
',gnus-article-mime-handle-alist))
(gnus-mime-display-alternative
- ',ihandles ',handle ',begend ,id))
+ ',ihandles ',not-pref ',begend ,id))
local-map ,gnus-mime-button-map
,gnus-mouse-face-prop ,gnus-article-mouse-face
face ,gnus-article-button-face
(widget-convert-button 'link from (point)
:action 'gnus-widget-press-button
:button-keymap gnus-widget-button-keymap)
- (insert " "))
- (insert "\n\n")
+ ;; Do the handles
+ (while (setq handle (pop handles))
+ (gnus-add-text-properties
+ (setq from (point))
+ (progn
+ (insert (format "[%c] %-18s"
+ (if (equal handle preferred) ?* ? )
+ (if (stringp (car handle))
+ (car handle)
+ (car (mm-handle-type handle)))))
+ (point))
+ `(gnus-callback
+ (lambda (handles)
+ (unless ,(not ibegend)
+ (setq gnus-article-mime-handle-alist
+ ',gnus-article-mime-handle-alist))
+ (gnus-mime-display-alternative
+ ',ihandles ',handle ',begend ,id))
+ local-map ,gnus-mime-button-map
+ ,gnus-mouse-face-prop ,gnus-article-mouse-face
+ face ,gnus-article-button-face
+ keymap ,gnus-mime-button-map
+ gnus-part ,id
+ gnus-data ,handle))
+ (widget-convert-button 'link from (point)
+ :action 'gnus-widget-press-button
+ :button-keymap gnus-widget-button-keymap)
+ (insert " "))
+ (insert "\n\n"))
(when preferred
(if (stringp (car preferred))
(gnus-display-mime preferred)
- (let ((rfc2047-default-charset gnus-newsgroup-coding-system)
+ (let ((rfc2047-default-charset gnus-newsgroup-default-charset)
(mm-charset-iso-8859-1-forced
gnus-newsgroup-iso-8859-1-forced))
(mm-display-part preferred)))
(unless (gnus-gethash "nndraft:drafts" gnus-newsrc-hashtb)
(let ((gnus-level-default-subscribed 1))
(gnus-subscribe-group "nndraft:drafts" nil '(nndraft "")))
+ (gnus-group-set-parameter "nndraft:drafts" 'charset "nil")
(gnus-group-set-parameter
"nndraft:drafts" 'gnus-dummy '((gnus-draft-mode)))))
:group 'gnus-summary
:type 'regexp)
-(defcustom gnus-newsgroup-coding-system-alist
+(defcustom gnus-newsgroup-default-charset-alist
'(("^hk\\>\\|^tw\\>\\|\\<big5\\>" . cn-big5)
("^cn\\>\\|\\<chinese\\>" . cn-gb-2312)
- ("^fj\\>" . iso-2022-jp-2)
+ ("^fj\\>\\|^japan\\>" . iso-2022-jp-2)
("^relcom\\>" . koi8-r))
- "Alist of Regexps (to match group names) and CODING-SYSTEMs to be applied."
+ "Alist of Regexps (to match group names) and default charsets to be applied."
:type '(repeat (cons (regexp :tag "Group")
(symbol :tag "Charset")))
:group 'gnus)
(defvar gnus-last-article nil)
(defvar gnus-newsgroup-history nil)
-(defvar gnus-newsgroup-coding-system nil)
+(defvar gnus-newsgroup-default-charset nil)
(defvar gnus-newsgroup-iso-8859-1-forced nil)
(defconst gnus-summary-local-variables
gnus-cache-removable-articles gnus-newsgroup-cached
gnus-newsgroup-data gnus-newsgroup-data-reverse
gnus-newsgroup-limit gnus-newsgroup-limits
- gnus-newsgroup-coding-system gnus-newsgroup-iso-8859-1-forced)
+ gnus-newsgroup-default-charset gnus-newsgroup-iso-8859-1-forced)
"Variables that are buffer-local to the summary buffers.")
;; Byte-compiler warning.
"s" gnus-soup-add-article)
(gnus-define-keys (gnus-summary-mime-map "K" gnus-summary-mode-map)
- "b" gnus-summary-display-buttonized)
+ "b" gnus-summary-display-buttonized
+ "v" gnus-article-view-part
+ "o" gnus-article-save-part
+ "c" gnus-article-copy-part
+ "e" gnus-article-externalize-part
+ "|" gnus-article-pipe-part)
)
(defun gnus-summary-make-menu-bar ()
(gac gnus-article-current)
(reffed gnus-reffed-article-number)
(score-file gnus-current-score-file)
- (coding-system gnus-newsgroup-coding-system)
+ (default-charset gnus-newsgroup-default-charset)
(iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(save-excursion
(set-buffer gnus-group-buffer)
gnus-original-article-buffer original
gnus-reffed-article-number reffed
gnus-current-score-file score-file
- gnus-newsgroup-coding-system coding-system
+ gnus-newsgroup-default-charset default-charset
gnus-newsgroup-iso-8859-1-forced iso-8859-1-forced)
;; The article buffer also has local variables.
(when (gnus-buffer-live-p gnus-article-buffer)
(defun gnus-summary-from-or-to-or-newsgroups (header)
(let ((to (cdr (assq 'To (mail-header-extra header))))
(newsgroups (cdr (assq 'Newsgroups (mail-header-extra header))))
- (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (rfc2047-default-charset gnus-newsgroup-default-charset)
(mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(cond
((and to
(save-excursion (set-buffer gnus-summary-buffer)
gnus-newsgroup-dependencies)))
headers id end ref
- (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (rfc2047-default-charset gnus-newsgroup-default-charset)
(mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(save-excursion
(set-buffer nntp-server-buffer)
;; Get the Xref when the users reads the articles since most/some
;; NNTP servers do not include Xrefs when using XOVER.
(setq gnus-article-internal-prepare-hook '(gnus-article-get-xrefs))
- (let ((rfc2047-default-charset gnus-newsgroup-coding-system)
+ (let ((rfc2047-default-charset gnus-newsgroup-default-charset)
(mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced)
(cur nntp-server-buffer)
(dependencies (or dependencies gnus-newsgroup-dependencies))
;;; @ end
;;;
-(defun gnus-newsgroup-setup-coding-system ()
- "Setup newsgroup default coding system."
- (setq gnus-newsgroup-coding-system
- (or (and gnus-newsgroup-name
- (or (gnus-group-find-parameter
- gnus-newsgroup-name 'charset)
- (let ((alist gnus-newsgroup-coding-system-alist)
- elem (charset nil))
- (while alist
- (if (string-match
- (car (setq elem (pop alist)))
- gnus-newsgroup-name)
- (setq alist nil
- charset (cdr elem))))
- charset)))
- rfc2047-default-charset))
- (setq gnus-newsgroup-iso-8859-1-forced
- (and gnus-newsgroup-name
- (or (gnus-group-find-parameter
- gnus-newsgroup-name 'iso-8859-1-forced)
- (string-match gnus-newsgroup-iso-8859-1-forced-regexp
- gnus-newsgroup-name))))
- (if (stringp gnus-newsgroup-coding-system)
- (setq gnus-newsgroup-coding-system
- (intern (downcase gnus-newsgroup-coding-system))))
+(defun gnus-newsgroup-setup-default-charset ()
+ "Setup newsgroup default charset."
+ (let ((name (and gnus-newsgroup-name
+ (string-match "[^:]+$" gnus-newsgroup-name)
+ (match-string 0 gnus-newsgroup-name))))
+ (setq gnus-newsgroup-default-charset
+ (or (and gnus-newsgroup-name
+ (or (gnus-group-find-parameter
+ gnus-newsgroup-name 'charset)
+ (let ((alist gnus-newsgroup-default-charset-alist)
+ elem (charset nil))
+ (while alist
+ (if (and name
+ (string-match
+ (car (setq elem (pop alist)))
+ name))
+ (setq alist nil
+ charset (cdr elem))))
+ charset)))
+ rfc2047-default-charset))
+ (setq gnus-newsgroup-iso-8859-1-forced
+ (and gnus-newsgroup-name
+ (or (gnus-group-find-parameter
+ gnus-newsgroup-name 'iso-8859-1-forced)
+ (and name
+ (string-match gnus-newsgroup-iso-8859-1-forced-regexp
+ name))))))
+ (if (stringp gnus-newsgroup-default-charset)
+ (setq gnus-newsgroup-default-charset
+ (intern (downcase gnus-newsgroup-default-charset))))
(setq gnus-newsgroup-iso-8859-1-forced
(if (stringp gnus-newsgroup-iso-8859-1-forced)
(intern (downcase gnus-newsgroup-iso-8859-1-forced))
(and gnus-newsgroup-iso-8859-1-forced
- gnus-newsgroup-coding-system))))
-
+ gnus-newsgroup-default-charset))))
+
;;;
;;; MIME Commands
;;;
(defconst gnus-product-name "T-gnus"
"Product name of this version of gnus.")
-(defconst gnus-version-number "6.10.039"
+(defconst gnus-version-number "6.10.040"
"Version number for this version of gnus.")
-(defconst gnus-original-version-number "0.53"
+(defconst gnus-original-version-number "0.54"
"Version number for this version of Gnus.")
(defconst gnus-original-product-name "Pterodactyl Gnus"
mouse-selection-click-count-buffer buffer-display-table
font-lock-defaults user-full-name user-login-name
gnus-newsgroup-name gnus-article-x-face-too-ugly
- gnus-newsgroup-coding-system
+ gnus-newsgroup-default-charset
gnus-newsgroup-iso-8859-1-forced
mail-mode-hook enable-multibyte-characters
adaptive-fill-first-line-regexp adaptive-fill-regexp
(defvar message-send-coding-system 'binary
"Coding system to encode outgoing mail.")
+(defvar message-draft-coding-system
+ (if (string-match "XEmacs\\|Lucid" emacs-version)
+ 'escape-quoted 'emacs-mule)
+ "Coding system to compose mail.")
+
;;; Internal variables.
(defvar message-default-charset nil)
(setq buffer-file-name (expand-file-name "*message*"
message-auto-save-directory))
(setq buffer-auto-save-file-name (make-auto-save-file-name)))
- (clear-visited-file-modtime)))
+ (clear-visited-file-modtime)
+ (setq buffer-file-coding-system message-draft-coding-system)))
(defun message-disassociate-draft ()
"Disassociate the message buffer from the drafts directory."
(defvar mm-inline-media-tests
'(("image/jpeg" mm-inline-image
- (and (featurep 'jpeg) (mm-image-fit-p handle)))
+ (and window-system (featurep 'jpeg) (mm-image-fit-p handle)))
("image/png" mm-inline-image
- (and (featurep 'png) (mm-image-fit-p handle)))
+ (and window-system (featurep 'png) (mm-image-fit-p handle)))
("image/gif" mm-inline-image
- (and (featurep 'gif) (mm-image-fit-p handle)))
+ (and window-system (featurep 'gif) (mm-image-fit-p handle)))
("image/tiff" mm-inline-image
- (and (featurep 'tiff) (mm-image-fit-p handle)))
- ("image/xbm" mm-inline-image (and (fboundp 'device-type)
- (eq (device-type) 'x)))
- ("image/xpm" mm-inline-image (featurep 'xpm))
- ("image/bmp" mm-inline-image (featurep 'bmp))
+ (and window-system (featurep 'tiff) (mm-image-fit-p handle)))
+ ("image/xbm" mm-inline-image
+ (and window-system (fboundp 'device-type)
+ (eq (device-type) 'x)))
+ ("image/xpm" mm-inline-image
+ (and window-system (featurep 'xpm)))
+ ("image/bmp" mm-inline-image
+ (and window-system (featurep 'bmp)))
("text/plain" mm-inline-text t)
("text/enriched" mm-inline-text t)
("text/richtext" mm-inline-text t)
"image/.*" "message/delivery-status" "multipart/.*"))
(defvar mm-alternative-precedence
- '("text/html" "text/enriched" "text/richtext" "text/plain")
+ '("image/jpeg" "image/gif" "text/html" "text/enriched"
+ "text/richtext" "text/plain")
"List that describes the precedence of alternative parts.")
(defvar mm-tmp-directory "/tmp/"
(select-window win)))
(switch-to-buffer (generate-new-buffer "*mm*")))
(buffer-disable-undo)
- (mm-set-buffer-file-coding-system 'no-conversion)
+ (mm-set-buffer-file-coding-system 'binary)
(insert-buffer-substring cur)
(message "Viewing with %s" method)
(let ((mm (current-buffer)))
dir))
(setq file (make-temp-name (expand-file-name "mm." dir))))
(write-region (point-min) (point-max)
- file nil 'nomesg nil 'no-conversion)
+ file nil 'nomesg nil 'binary)
(message "Viewing with %s" method)
(unwind-protect
(setq process
(when (or (not (file-exists-p file))
(yes-or-no-p (format "File %s already exists; overwrite? "
file)))
- (write-region (point-min) (point-max) file)))))
+ (let ((coding-system-for-write
+ (if (equal "text" (car (split-string
+ (car (mm-handle-type handle)) "/")))
+ buffer-file-coding-system
+ 'binary)))
+ (write-region (point-min) (point-max) file))))))
(defun mm-pipe-part (handle)
"Pipe HANDLE to a process."
(defun mm-preferred-alternative (handles &optional preferred)
"Say which of HANDLES are preferred."
(let ((prec (if preferred (list preferred) mm-alternative-precedence))
- p h result type)
+ p h result type handle)
(while (setq p (pop prec))
(setq h handles)
(while h
(if (stringp (caar h))
(caar h)
(car (mm-handle-type (car h)))))
+ (setq handle (car h))
(when (and (equal p type)
(mm-automatic-display-p type)
(or (stringp (caar h))
(defun mm-image-fit-p (handle)
"Say whether the image in HANDLE will fit the current window."
- (or t
- (let ((image (make-image-instance (mm-get-image handle))))
- (and (< (image-instance-width image)
- (window-pixel-width))
- (< (image-instance-height image)
- (window-pixel-height))))))
+ (let ((image (make-annotation (mm-get-image handle))))
+ (and (< (glyph-width (annotation-glyph image))
+ (window-pixel-width))
+ (< (glyph-height (annotation-glyph image))
+ (window-pixel-height)))))
(provide 'mm-decode)
(get-buffer-create (generate-new-buffer-name " *temp*")))
(unwind-protect
(with-current-buffer ,temp-buffer
- (let (buffer-file-coding-system)
+ (let ((buffer-file-coding-system 'binary))
,@forms))
(and (buffer-name ,temp-buffer)
(kill-buffer ,temp-buffer))))
;; Copyright (c) 1998 by Shenghuo Zhu <zsh@cs.rochester.edu>
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
-;; $Revision: 1.1.2.4 $
+;; $Revision: 1.1.2.5 $
;; Keywords: news postscript uudecode binhex shar
;; This file is not part of GNU Emacs, but the same permissions
(defun mm-uu-dissect ()
"Dissect the current buffer and return a list of uu handles."
- (save-excursion
- (save-restriction
- (mail-narrow-to-head)
- (goto-char (point-max)))
- (forward-line)
- (let ((text-start (point)) start-char end-char
- type file-name end-line result)
+ (let (ct ctl cte charset text-start start-char end-char
+ type file-name end-line result text-plain-type)
+ (save-excursion
+ (save-restriction
+ (mail-narrow-to-head)
+ (when (and (mail-fetch-field "mime-version")
+ (setq ct (mail-fetch-field "content-type")))
+ (setq cte (message-fetch-field "content-transfer-encoding" t)
+ ctl (condition-case () (mail-header-parse-content-type ct)
+ (error nil))
+ charset (and ctl (mail-content-type-get ctl 'charset)))
+ (if (stringp cte)
+ (setq cte (intern (downcase (mail-header-remove-whitespace
+ (mail-header-remove-comments
+ cte)))))))
+ (goto-char (point-max)))
+ (forward-line)
+ (setq text-start (point)
+ text-plain-type (cons "text/plain"
+ (if charset
+ (list (cons 'charset charset)))))
(while (re-search-forward mm-uu-begin-line nil t)
(beginning-of-line)
(setq start-char (point))
(nnheader-translate-file-chars (match-string 1))))))
(setq end-line (symbol-value
(intern (concat "mm-uu-" (symbol-name type)
- "-end-line"))))
+ "-end-line"))))
(when (re-search-forward end-line nil t)
(forward-line)
(setq end-char (point))
(if (> start-char text-start)
(push
(list (mm-uu-copy-to-buffer text-start start-char)
- '("text/plain") nil nil nil nil)
+ text-plain-type cte nil nil nil)
result))
(push
(cond
(if (> (point-max) (1+ text-start))
(push
(list (mm-uu-copy-to-buffer text-start (point-max))
- '("text/plain") nil nil nil nil)
+ text-plain-type cte nil nil nil)
result))
(setq result (cons "multipart/mixed" (nreverse result))))
result)))
+;;;### autoload
+(defun mm-uu-test ()
+ "Check whether the current buffer contains uu stuffs."
+ (save-excursion
+ (save-restriction
+ (mail-narrow-to-head)
+ (goto-char (point-max)))
+ (forward-line)
+ (let (type end-line result)
+ (while (and (not result) (re-search-forward mm-uu-begin-line nil t))
+ (forward-line)
+ (setq type (cdr (assq (aref (match-string 0) 0)
+ mm-uu-identifier-alist)))
+ (setq end-line (symbol-value
+ (intern (concat "mm-uu-" (symbol-name type)
+ "-end-line"))))
+ (if (re-search-forward end-line nil t)
+ (setq result t)))
+ result)))
+
(provide 'mm-uu)
;;; mm-uu.el ends here
(newest (if (file-newer-than-file-p file auto) file auto))
(nntp-server-buffer (or buffer nntp-server-buffer)))
(when (and (file-exists-p newest)
- (nnmail-find-file newest))
+ (let ((nnmail-file-coding-system
+ message-draft-coding-system))
+ (nnmail-find-file newest)))
(save-excursion
(set-buffer nntp-server-buffer)
(goto-char (point-min))
(prog1
(match-string 0)
(delete-region (match-beginning 0) (match-end 0)))))
- (when (mm-multibyte-p)
+ (when (and (mm-multibyte-p) rfc2047-default-charset)
(mm-decode-coding-region b e rfc2047-default-charset))
(setq b (point)))
- (when (mm-multibyte-p)
+ (when (and (mm-multibyte-p) rfc2047-default-charset)
(mm-decode-coding-region b (point-max) rfc2047-default-charset))))))
(defun rfc2047-decode-string (string)