emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/gnus-decoded f1c980a: Preserve group name encoding


From: Eric Abrahamsen
Subject: [Emacs-diffs] scratch/gnus-decoded f1c980a: Preserve group name encoding in newsrc.eld files
Date: Thu, 6 Jun 2019 23:47:59 -0400 (EDT)

branch: scratch/gnus-decoded
commit f1c980a979f23676253c71c07a78e4546ee57800
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Preserve group name encoding in newsrc.eld files
    
    * lisp/gnus/gnus-start.el (gnus-gnus-to-quick-newsrc-format): Preserve
      Gnus' earlier odd encoding of group names. Don't change any file
      formats until it's time to release a new Gnus version.
---
 lisp/gnus/gnus-start.el | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 9a93ad0..32d438a 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -2887,7 +2887,19 @@ SPECIFIC-VARIABLES, or those in `gnus-variable-list'."
       (set (nth (seq-position gnus-variable-list 'gnus-newsrc-alist)
                gnus-variable-list)
           (mapcar (lambda (g)
-                    (nth 1 (gethash g gnus-newsrc-hashtb)))
+                    (let ((entry (copy-sequence
+                                  (nth 1 (gethash g gnus-newsrc-hashtb)))))
+                      ;; Encode in order to keep newsrc.eld files
+                      ;; compatible with older versions of Gnus.  At
+                      ;; some point, if/when a new version of Gnus is
+                      ;; released, drop this (and the corresponding
+                      ;; decode in
+                      ;; `gnus-make-hashtable-from-newsrc-alist').
+                      (setf (car entry)
+                            (encode-coding-string
+                             (car entry)
+                             'utf-8-emacs))
+                      entry))
                   (delete "dummy.group" gnus-group-list)))
 
       ;; Insert the variables into the file.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]