aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2018-04-14 23:54:07 +0200
committerLars Ingebrigtsen2018-04-14 23:54:07 +0200
commit4b0c425047b61b306e7775bae11bd0edd78a7c96 (patch)
tree5e58fcf6d26177933f06e852113e51bdc353ff87
parent679a433744ca550a079ff47e1964ff558965b51a (diff)
downloademacs-4b0c425047b61b306e7775bae11bd0edd78a7c96.tar.gz
emacs-4b0c425047b61b306e7775bae11bd0edd78a7c96.zip
Remove two string-as-unibyte in gnus-srvr.el
* lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): We do not seem to need the string-as-unibyte here: We read a multibyte string from the *nntpd* buffer and then decode it later, and this apparently by some strange magic leads to the correct results in my test cases.
-rw-r--r--lisp/gnus/gnus-srvr.el36
1 files changed, 17 insertions, 19 deletions
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index 94fd21b9204..dfca5e9d2cb 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -808,12 +808,11 @@ claim them."
808 (while (not (eobp)) 808 (while (not (eobp))
809 (ignore-errors 809 (ignore-errors
810 (push (cons 810 (push (cons
811 (string-as-unibyte 811 (buffer-substring
812 (buffer-substring 812 (point)
813 (point) 813 (progn
814 (progn 814 (skip-chars-forward "^ \t")
815 (skip-chars-forward "^ \t") 815 (point)))
816 (point))))
817 (let ((last (read cur))) 816 (let ((last (read cur)))
818 (cons (read cur) last))) 817 (cons (read cur) last)))
819 groups)) 818 groups))
@@ -821,19 +820,18 @@ claim them."
821 (while (not (eobp)) 820 (while (not (eobp))
822 (ignore-errors 821 (ignore-errors
823 (push (cons 822 (push (cons
824 (string-as-unibyte 823 (if (eq (char-after) ?\")
825 (if (eq (char-after) ?\") 824 (read cur)
826 (read cur) 825 (let ((p (point)) (name ""))
827 (let ((p (point)) (name "")) 826 (skip-chars-forward "^ \t\\\\")
828 (skip-chars-forward "^ \t\\\\") 827 (setq name (buffer-substring p (point)))
829 (setq name (buffer-substring p (point))) 828 (while (eq (char-after) ?\\)
830 (while (eq (char-after) ?\\) 829 (setq p (1+ (point)))
831 (setq p (1+ (point))) 830 (forward-char 2)
832 (forward-char 2) 831 (skip-chars-forward "^ \t\\\\")
833 (skip-chars-forward "^ \t\\\\") 832 (setq name (concat name (buffer-substring
834 (setq name (concat name (buffer-substring 833 p (point)))))
835 p (point))))) 834 name))
836 name)))
837 (let ((last (read cur))) 835 (let ((last (read cur)))
838 (cons (read cur) last))) 836 (cons (read cur) last)))
839 groups)) 837 groups))