diff options
| author | Lars Ingebrigtsen | 2017-01-31 17:52:51 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2017-01-31 17:52:51 +0100 |
| commit | d1c931009004aef847105b7bac6b6ffafd985b82 (patch) | |
| tree | aef30c0bc2623b31a2818ce16d69fee59c0045fc | |
| parent | 18a3fccd89d04afc13ce7b4561e224874c317283 (diff) | |
| download | emacs-d1c931009004aef847105b7bac6b6ffafd985b82.tar.gz emacs-d1c931009004aef847105b7bac6b6ffafd985b82.zip | |
DOn't use string-as-unibyte in Gnus
* lisp/gnus/nnmail.el (nnmail-parse-active): Don't use
string-as-unibyte.
(nnmail-insert-xref): Ditto.
* lisp/gnus/canlock.el (canlock-make-cancel-key): Ditto.
* lisp/gnus/gnus-art.el (gnus-article-browse-html-parts): Ditto.
* lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): Ditto.
(gnus-browse-foreign-server): Ditto.
(gnus-browse-foreign-server): Ditto.
* lisp/gnus/gnus-start.el
(gnus-update-active-hashtb-from-killed): Ditto.
(gnus-read-newsrc-el-file): Ditto.
* lisp/gnus/mml.el (mml-generate-mime-1): Ditto.
* lisp/gnus/nnir.el (nnir-get-active): Ditto.
(nnir-get-active): Ditto.
| -rw-r--r-- | lisp/gnus/canlock.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 3 | ||||
| -rw-r--r-- | lisp/gnus/gnus-srvr.el | 10 | ||||
| -rw-r--r-- | lisp/gnus/gnus-start.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/mml.el | 5 | ||||
| -rw-r--r-- | lisp/gnus/nnir.el | 10 | ||||
| -rw-r--r-- | lisp/gnus/nnmail.el | 7 |
7 files changed, 24 insertions, 17 deletions
diff --git a/lisp/gnus/canlock.el b/lisp/gnus/canlock.el index 9e13ced4670..6c28b1c66df 100644 --- a/lisp/gnus/canlock.el +++ b/lisp/gnus/canlock.el | |||
| @@ -90,7 +90,7 @@ buffer does not look like a news message." | |||
| 90 | (canlock-sha1 | 90 | (canlock-sha1 |
| 91 | (concat opad | 91 | (concat opad |
| 92 | (canlock-sha1 | 92 | (canlock-sha1 |
| 93 | (concat ipad (string-as-unibyte message-id)))))))) | 93 | (concat ipad (encode-coding-string message-id 'utf-8)))))))) |
| 94 | 94 | ||
| 95 | (defun canlock-narrow-to-header () | 95 | (defun canlock-narrow-to-header () |
| 96 | "Narrow the buffer to the head of the message." | 96 | "Narrow the buffer to the head of the message." |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index a4ff840f755..d96c511ec0d 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -2938,7 +2938,8 @@ message header will be added to the bodies of the \"text/html\" parts." | |||
| 2938 | (encode-coding-string | 2938 | (encode-coding-string |
| 2939 | title coding)) | 2939 | title coding)) |
| 2940 | body content)) | 2940 | body content)) |
| 2941 | (setq eheader (string-as-unibyte (buffer-string)) | 2941 | (setq eheader (encode-coding-string |
| 2942 | (buffer-string) 'utf-8) | ||
| 2942 | body content))) | 2943 | body content))) |
| 2943 | (erase-buffer) | 2944 | (erase-buffer) |
| 2944 | (mm-disable-multibyte) | 2945 | (mm-disable-multibyte) |
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index bed5993b9c1..67744cebc87 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el | |||
| @@ -821,12 +821,13 @@ claim them." | |||
| 821 | (while (not (eobp)) | 821 | (while (not (eobp)) |
| 822 | (ignore-errors | 822 | (ignore-errors |
| 823 | (push (cons | 823 | (push (cons |
| 824 | (string-as-unibyte | 824 | (encode-coding-string |
| 825 | (buffer-substring | 825 | (buffer-substring |
| 826 | (point) | 826 | (point) |
| 827 | (progn | 827 | (progn |
| 828 | (skip-chars-forward "^ \t") | 828 | (skip-chars-forward "^ \t") |
| 829 | (point)))) | 829 | (point))) |
| 830 | 'utf-8) | ||
| 830 | (let ((last (read cur))) | 831 | (let ((last (read cur))) |
| 831 | (cons (read cur) last))) | 832 | (cons (read cur) last))) |
| 832 | groups)) | 833 | groups)) |
| @@ -834,7 +835,7 @@ claim them." | |||
| 834 | (while (not (eobp)) | 835 | (while (not (eobp)) |
| 835 | (ignore-errors | 836 | (ignore-errors |
| 836 | (push (cons | 837 | (push (cons |
| 837 | (string-as-unibyte | 838 | (encode-coding-string |
| 838 | (if (eq (char-after) ?\") | 839 | (if (eq (char-after) ?\") |
| 839 | (read cur) | 840 | (read cur) |
| 840 | (let ((p (point)) (name "")) | 841 | (let ((p (point)) (name "")) |
| @@ -846,7 +847,8 @@ claim them." | |||
| 846 | (skip-chars-forward "^ \t\\\\") | 847 | (skip-chars-forward "^ \t\\\\") |
| 847 | (setq name (concat name (buffer-substring | 848 | (setq name (concat name (buffer-substring |
| 848 | p (point))))) | 849 | p (point))))) |
| 849 | name))) | 850 | name)) |
| 851 | 'utf-8) | ||
| 850 | (let ((last (read cur))) | 852 | (let ((last (read cur))) |
| 851 | (cons (read cur) last))) | 853 | (cons (read cur) last))) |
| 852 | groups)) | 854 | groups)) |
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index be46339cd38..2cefc78fb9e 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -1990,7 +1990,7 @@ backend check whether the group actually exists." | |||
| 1990 | (while lists | 1990 | (while lists |
| 1991 | (setq killed (car lists)) | 1991 | (setq killed (car lists)) |
| 1992 | (while killed | 1992 | (while killed |
| 1993 | (gnus-sethash (string-as-unibyte (car killed)) nil hashtb) | 1993 | (gnus-sethash (encode-coding-string (car killed) 'utf-8) nil hashtb) |
| 1994 | (setq killed (cdr killed))) | 1994 | (setq killed (cdr killed))) |
| 1995 | (setq lists (cdr lists))))) | 1995 | (setq lists (cdr lists))))) |
| 1996 | 1996 | ||
| @@ -2453,7 +2453,7 @@ If FORCE is non-nil, the .newsrc file is read." | |||
| 2453 | (dolist (elem gnus-newsrc-alist) | 2453 | (dolist (elem gnus-newsrc-alist) |
| 2454 | ;; Protect against broken .newsrc.el files. | 2454 | ;; Protect against broken .newsrc.el files. |
| 2455 | (when (car elem) | 2455 | (when (car elem) |
| 2456 | (setcar elem (string-as-unibyte (car elem))))) | 2456 | (setcar elem (encode-coding-string (car elem) 'utf-8)))) |
| 2457 | (gnus-make-hashtable-from-newsrc-alist) | 2457 | (gnus-make-hashtable-from-newsrc-alist) |
| 2458 | (when (file-newer-than-file-p file ding-file) | 2458 | (when (file-newer-than-file-p file ding-file) |
| 2459 | ;; Old format quick file | 2459 | ;; Old format quick file |
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 3a31349d378..aaadf0c7778 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el | |||
| @@ -696,9 +696,10 @@ be \"related\" or \"alternate\"." | |||
| 696 | (set-buffer-multibyte nil) | 696 | (set-buffer-multibyte nil) |
| 697 | (cond | 697 | (cond |
| 698 | ((cdr (assq 'buffer cont)) | 698 | ((cdr (assq 'buffer cont)) |
| 699 | (insert (string-as-unibyte | 699 | (insert (encode-coding-string |
| 700 | (with-current-buffer (cdr (assq 'buffer cont)) | 700 | (with-current-buffer (cdr (assq 'buffer cont)) |
| 701 | (buffer-string))))) | 701 | (buffer-string)) |
| 702 | 'utf-8))) | ||
| 702 | ((and filename | 703 | ((and filename |
| 703 | (not (equal (cdr (assq 'nofile cont)) "yes"))) | 704 | (not (equal (cdr (assq 'nofile cont)) "yes"))) |
| 704 | (let ((coding-system-for-read mm-binary-coding-system)) | 705 | (let ((coding-system-for-read mm-binary-coding-system)) |
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index 9640f2c746f..174be65035f 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el | |||
| @@ -1818,19 +1818,20 @@ article came from is also searched." | |||
| 1818 | (if (eq (car method) 'nntp) | 1818 | (if (eq (car method) 'nntp) |
| 1819 | (while (not (eobp)) | 1819 | (while (not (eobp)) |
| 1820 | (ignore-errors | 1820 | (ignore-errors |
| 1821 | (push (string-as-unibyte | 1821 | (push (encode-coding-string |
| 1822 | (gnus-group-full-name | 1822 | (gnus-group-full-name |
| 1823 | (buffer-substring | 1823 | (buffer-substring |
| 1824 | (point) | 1824 | (point) |
| 1825 | (progn | 1825 | (progn |
| 1826 | (skip-chars-forward "^ \t") | 1826 | (skip-chars-forward "^ \t") |
| 1827 | (point))) | 1827 | (point))) |
| 1828 | method)) | 1828 | method) |
| 1829 | 'utf-8) | ||
| 1829 | groups)) | 1830 | groups)) |
| 1830 | (forward-line)) | 1831 | (forward-line)) |
| 1831 | (while (not (eobp)) | 1832 | (while (not (eobp)) |
| 1832 | (ignore-errors | 1833 | (ignore-errors |
| 1833 | (push (string-as-unibyte | 1834 | (push (encode-coding-string |
| 1834 | (if (eq (char-after) ?\") | 1835 | (if (eq (char-after) ?\") |
| 1835 | (gnus-group-full-name (read cur) method) | 1836 | (gnus-group-full-name (read cur) method) |
| 1836 | (let ((p (point)) (name "")) | 1837 | (let ((p (point)) (name "")) |
| @@ -1842,7 +1843,8 @@ article came from is also searched." | |||
| 1842 | (skip-chars-forward "^ \t\\\\") | 1843 | (skip-chars-forward "^ \t\\\\") |
| 1843 | (setq name (concat name (buffer-substring | 1844 | (setq name (concat name (buffer-substring |
| 1844 | p (point))))) | 1845 | p (point))))) |
| 1845 | (gnus-group-full-name name method)))) | 1846 | (gnus-group-full-name name method))) |
| 1847 | 'utf-8) | ||
| 1846 | groups)) | 1848 | groups)) |
| 1847 | (forward-line))))) | 1849 | (forward-line))))) |
| 1848 | groups)) | 1850 | groups)) |
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 3f2e08171e0..224d5db5427 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el | |||
| @@ -665,7 +665,7 @@ nn*-request-list should have been called before calling this function." | |||
| 665 | (setq group (symbol-name group))) | 665 | (setq group (symbol-name group))) |
| 666 | (if (and (numberp (setq max (read buffer))) | 666 | (if (and (numberp (setq max (read buffer))) |
| 667 | (numberp (setq min (read buffer)))) | 667 | (numberp (setq min (read buffer)))) |
| 668 | (push (list (string-as-unibyte group) (cons min max)) | 668 | (push (list (encode-coding-string group 'utf-8) (cons min max)) |
| 669 | group-assoc))) | 669 | group-assoc))) |
| 670 | (error nil)) | 670 | (error nil)) |
| 671 | (widen) | 671 | (widen) |
| @@ -1251,8 +1251,9 @@ Return the number of characters in the body." | |||
| 1251 | (insert (if (mm-multibyte-p) | 1251 | (insert (if (mm-multibyte-p) |
| 1252 | (string-as-multibyte | 1252 | (string-as-multibyte |
| 1253 | (format " %s:%d" (caar group-alist) (cdar group-alist))) | 1253 | (format " %s:%d" (caar group-alist) (cdar group-alist))) |
| 1254 | (string-as-unibyte | 1254 | (encode-coding-string |
| 1255 | (format " %s:%d" (caar group-alist) (cdar group-alist))))) | 1255 | (format " %s:%d" (caar group-alist) (cdar group-alist)) |
| 1256 | 'utf-8))) | ||
| 1256 | (setq group-alist (cdr group-alist))) | 1257 | (setq group-alist (cdr group-alist))) |
| 1257 | (insert "\n"))) | 1258 | (insert "\n"))) |
| 1258 | 1259 | ||