diff options
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/ChangeLog.22 | 127 | ||||
-rw-r--r-- | lisp/gnus/gnus-start.el | 8 | ||||
-rw-r--r-- | lisp/gnus/gnus-sum.el | 2 | ||||
-rw-r--r-- | lisp/gnus/mm-bodies.el | 3 | ||||
-rw-r--r-- | lisp/gnus/mm-util.el | 62 | ||||
-rw-r--r-- | lisp/gnus/mml.el | 5 | ||||
-rw-r--r-- | lisp/gnus/rfc2104.el | 14 |
7 files changed, 147 insertions, 74 deletions
diff --git a/lisp/gnus/ChangeLog.22 b/lisp/gnus/ChangeLog.22 new file mode 100644 index 00000000000..4fcde1f3c09 --- /dev/null +++ b/lisp/gnus/ChangeLog.22 @@ -0,0 +1,127 @@ +2004-09-27 Miles Bader <miles@gnu.org> + + * mml.el (mml-parse-1): Remove apparently vestigial use of + `mm-hack-charsets'. + * mm-bodies.el (mm-encode-body): Likewise. + +2003-11-17 Kenichi Handa <handa@m17n.org> + + * mm-util.el (mm-enable-multibyte): Call set-buffer-multibyte + with the arg `to'. + +2003-11-13 Kenichi Handa <handa@m17n.org> + + * rfc2104.el (rfc2104-hexstring-to-byte-list): Renamed from + rfc2104-hexstring-to-bitstring and changed to return a byte list. + (rfc2104-hash): Convert the result of concat to unibyte string. + +2002-10-16 Dave Love <fx@gnu.org> + + * mm-bodies.el (mm-encode-body): Doc fix. + + * qp.el (quoted-printable-encode-region): Fix non-Emacs 22 case. + +2002-10-09 Dave Love <fx@gnu.org> + + * qp.el (quoted-printable-encode-region): Fix non-multibyte search + for Emacs 22. + +2002-10-07 Dave Love <fx@gnu.org> + + * qp.el (quoted-printable-encode-region): Go to start of range + before searching. + (quoted-printable-encode-region): Use multibyte-char-to-unibyte. + +2002-09-05 Dave Love <fx@gnu.org> + + * qp.el (quoted-printable-decode-region): Use mm-insert-byte. + + * mm-util.el (mm-hack-charsets, mm-iso-8859-15-compatible) + (mm-iso-8859-x-to-15-table, mm-iso-8859-x-to-15-region): Deleted. + (mm-find-mime-charset-region): Remove hack-charsets stuff. + (mm-insert-byte): New. + + * rfc2047.el (message-posting-charset): defvar when compiling. + (rfc2047-header-encoding-alist): Add `address-mime' part. + (rfc2047-charset-encoding-alist): Use B for iso-8859-7. Doc fix. + (rfc2047-q-encoding-alist): Augment header list. + (rfc2047-encodable-p): Use mm-find-mime-charset-region. + (rfc2047-special-chars, rfc2047-non-special-chars): New. + (rfc2047-dissect-region, rfc2047-encode-region, rfc2047-encode): + Rewritten to avoid charset stuff and to take account of rfc2822 + tokens. + (rfc2047-encode-message-header): Don't include header name field + in encoding. Add `address-mime' case and bind + rfc2047-special-chars for `mime' case. + +2002-08-21 Kenichi Handa <handa@etl.go.jp> + + * qp.el (quoted-printable-decode-region): Insert bytes by + `insert-byte'. + +2002-08-18 Dave Love <fx@gnu.org> + + * rfc2047.el (rfc2047-encode): Fix last change. + +2002-07-30 Dave Love <fx@gnu.org> + + * rfc2047.el (rfc2047-charset-encoding-alist): Use B for Hebrew. + Doc fix. + + * gnus-start.el (gnus-read-newsrc-el-file): Don't bind + coding-system-for-read. + (gnus-gnus-to-quick-newsrc-format): Insert coding cookie. + +2002-07-09 Dave Love <fx@gnu.org> + + * mm-util.el (mm-find-mime-charset-region): Fix :mime-charset + part. + +2002-06-26 Dave Love <fx@gnu.org> + + * rfc2047.el (rfc2047-encodable-p): Avoid mm-find-charset-region. + (rfc2047-dissect-region): Don't record charsets. + (rfc2047-encode): Remove arg CHARSET. + (rfc2047-encode-region): Change rfc2047-encode call. + +2002-06-24 Dave Love <fx@gnu.org> + + * mm-util.el (mm-mule4-p, mm-enable-multibyte-mule4) + (mm-disable-multibyte-mule4) + (mm-with-unibyte-current-buffer-mule4): Deleted. + + * gnus-sum.el (gnus-summary-mode, gnus-summary-display-article) + (gnus-summary-select-article, gnus-summary-edit-article): Use + mm-{en,dis}able-multibyte, not mm-{en,dis}able-multibyte-mule4. + + * message.el (message-forward-make-body): Use + mm-{en,dis}able-multibyte, not mm-{en,dis}able-multibyte-mule4. + + * qp.el (quoted-printable-encode-region): Avoid + find-charset-region. + + * mm-bodies.el (mm-body-7-or-8): Don't special-case Mule. + (mm-encode-body): Just call mm-encode-coding-region in encoding + case. + +2002-05-27 Dave Love <fx@gnu.org> + + * mm-util.el (mm-auto-save-coding-system): Prefer utf-8-emacs + coding system to emacs-mule. + +2002-05-14 Dave Love <fx@gnu.org> + + * mm-util.el (mm-mime-mule-charset-alist) + (mm-mule-charset-to-mime-charset, mm-charset-to-coding-system) + (mm-mime-charset, mm-find-mime-charset-region): Look for + `:mime-charset' property of coding systems before `mime-charset'. + +;; Local Variables: +;; coding: iso-2022-7bit +;; End: + + Copyright (C) 2002 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, + are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: d7f0febd-4aca-429a-9493-d71cd04ad9f0 diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index e1985c5db5d..c1c79033267 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -457,6 +457,8 @@ Can be used to turn version control on or off." ;;; Internal variables +;; Fixme: deal with old emacs-mule when mm-universal-coding-system is +;; utf-8-emacs. (defvar gnus-ding-file-coding-system mm-universal-coding-system "Coding system for ding file.") @@ -2361,8 +2363,7 @@ If FORCE is non-nil, the .newsrc file is read." ;; We always, always read the .eld file. (gnus-message 5 "Reading %s..." ding-file) (let (gnus-newsrc-assoc) - (let ((coding-system-for-read gnus-ding-file-coding-system)) - (gnus-load ding-file)) + (gnus-load ding-file) ;; Older versions of `gnus-format-specs' are no longer valid ;; in Oort Gnus 0.01. (let ((version @@ -2792,7 +2793,8 @@ If FORCE is non-nil, the .newsrc file is read." (defun gnus-gnus-to-quick-newsrc-format (&optional minimal name &rest specific-variables) "Print Gnus variables such as `gnus-newsrc-alist' in Lisp format." - (princ ";; -*- emacs-lisp -*-\n") + (princ (format ";; -*- emacs-lisp; coding: %s;-*-\n" + gnus-ding-file-coding-system)) (if name (princ (format ";; %s\n" name)) (princ ";; Gnus startup file.\n")) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index c4f320e888b..1f6f5437841 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1,5 +1,5 @@ ;;; gnus-sum.el --- summary mode commands for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el index a1d67cf1f93..34804b867d0 100644 --- a/lisp/gnus/mm-bodies.el +++ b/lisp/gnus/mm-bodies.el @@ -98,8 +98,7 @@ If no encoding was done, nil is returned." (mm-encode-coding-region (point-min) (point-max) charset) charset) (goto-char (point-min)) - (let ((charsets (mm-find-mime-charset-region (point-min) (point-max) - mm-hack-charsets))) + (let ((charsets (mm-find-mime-charset-region (point-min) (point-max)))) (cond ;; No encoding. ((null charsets) diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index c0ccaa316ba..bfda1591a2e 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -297,36 +297,6 @@ with Mule charsets. It is completely useless for Emacs." (push (cons mime (delq 'ascii mule)) alist))) (setq mm-mime-mule-charset-alist (nreverse alist))))) -(defvar mm-hack-charsets '(iso-8859-15 iso-2022-jp-2) - "A list of special charsets. -Valid elements include: -`iso-8859-15' convert ISO-8859-1, -9 to ISO-8859-15 if ISO-8859-15 exists. -`iso-2022-jp-2' convert ISO-2022-jp to ISO-2022-jp-2 if ISO-2022-jp-2 exists." -) - -(defvar mm-iso-8859-15-compatible - '((iso-8859-1 "\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE") - (iso-8859-9 "\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE\xD0\xDD\xDE\xF0\xFD\xFE")) - "ISO-8859-15 exchangeable coding systems and inconvertible characters.") - -(defvar mm-iso-8859-x-to-15-table - (and (fboundp 'coding-system-p) - (mm-coding-system-p 'iso-8859-15) - (mapcar - (lambda (cs) - (if (mm-coding-system-p (car cs)) - (let ((c (string-to-char - (decode-coding-string "\341" (car cs))))) - (cons (char-charset c) - (cons - (- (string-to-char - (decode-coding-string "\341" 'iso-8859-15)) c) - (string-to-list (decode-coding-string (car (cdr cs)) - (car cs)))))) - '(gnus-charset 0))) - mm-iso-8859-15-compatible)) - "A table of the difference character between ISO-8859-X and ISO-8859-15.") - (defcustom mm-coding-system-priorities (if (boundp 'current-language-environment) (let ((lang (symbol-value 'current-language-environment))) @@ -542,27 +512,6 @@ This affects whether coding conversion should be attempted generally." default-enable-multibyte-characters t))) -(defun mm-iso-8859-x-to-15-region (&optional b e) - (if (fboundp 'char-charset) - (let (charset item c inconvertible) - (save-restriction - (if e (narrow-to-region b e)) - (goto-char (point-min)) - (skip-chars-forward "\0-\177") - (while (not (eobp)) - (cond - ((not (setq item (assq (char-charset (setq c (char-after))) - mm-iso-8859-x-to-15-table))) - (forward-char)) - ((memq c (cdr (cdr item))) - (setq inconvertible t) - (forward-char)) - (t - (insert-before-markers (prog1 (+ c (car (cdr item))) - (delete-char 1))))) - (skip-chars-forward "\0-\177"))) - (not inconvertible)))) - (defun mm-sort-coding-systems-predicate (a b) (let ((priorities (mapcar (lambda (cs) @@ -699,21 +648,14 @@ charset, and a longer list means no appropriate charset." ;; Otherwise, we'll get nil, and the next setq will get invoked. (setq charsets (mm-xemacs-find-mime-charset b e)) + ;; Fixme: won't work for unibyte Emacs 22: + ;; We're not multibyte, or a single coding system won't cover it. (setq charsets (mm-delete-duplicates (mapcar 'mm-mime-charset (delq 'ascii (mm-find-charset-region b e)))))) - (if (and (> (length charsets) 1) - (memq 'iso-8859-15 charsets) - (memq 'iso-8859-15 hack-charsets) - (save-excursion (mm-iso-8859-x-to-15-region b e))) - (mapcar (lambda (x) (setq charsets (delq (car x) charsets))) - mm-iso-8859-15-compatible)) - (if (and (memq 'iso-2022-jp-2 charsets) - (memq 'iso-2022-jp-2 hack-charsets)) - (setq charsets (delq 'iso-2022-jp charsets))) charsets)) (defmacro mm-with-unibyte-buffer (&rest forms) diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 8efaede70e0..d88f6318159 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -1,5 +1,5 @@ ;;; mml.el --- A package for parsing and validating MML documents -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -213,8 +213,7 @@ one charsets.") (list (intern (downcase (cdr (assq 'charset tag)))))) (t - (mm-find-mime-charset-region point (point) - mm-hack-charsets)))) + (mm-find-mime-charset-region point (point))))) (when (and (not raw) (memq nil charsets)) (if (or (memq 'unknown-encoding mml-confirmation-set) (message-options-get 'unknown-encoding) diff --git a/lisp/gnus/rfc2104.el b/lisp/gnus/rfc2104.el index a70ba16c164..1ab7c80a046 100644 --- a/lisp/gnus/rfc2104.el +++ b/lisp/gnus/rfc2104.el @@ -51,6 +51,7 @@ ;;; 1999-10-23 included in pgnus ;;; 2000-08-15 `rfc2104-hexstring-to-bitstring' ;;; 2000-05-12 added sha-1 example, added test case reference +;;; 2003-11-13 change rfc2104-hexstring-to-bitstring to ...-byte-list ;;; Code: @@ -86,12 +87,12 @@ (rfc2104-hex-to-int (reverse (append str nil)))) 0)) -(defun rfc2104-hexstring-to-bitstring (str) +(defun rfc2104-hexstring-to-byte-list (str) (let (out) (while (< 0 (length str)) (push (rfc2104-hex-to-int (substring str -2)) out) (setq str (substring str 0 -2))) - (concat out))) + out)) (defun rfc2104-hash (hash block-length hash-length key text) (let* (;; if key is longer than B, reset it to HASH(key) @@ -108,9 +109,12 @@ (setq k_ipad (mapcar (lambda (c) (logxor c rfc2104-ipad)) k_ipad)) (setq k_opad (mapcar (lambda (c) (logxor c rfc2104-opad)) k_opad)) ;; perform outer hash - (funcall hash (concat k_opad (rfc2104-hexstring-to-bitstring - ;; perform inner hash - (funcall hash (concat k_ipad text))))))) + (funcall hash + (encode-coding-string + (concat k_opad (rfc2104-hexstring-to-byte-list + ;; perform inner hash + (funcall hash (concat k_ipad text)))) + 'iso-latin-1)))) (provide 'rfc2104) |