[gnus git] branch master updated: m0-5-88-g3c23983 =1= Enable posting-style group parameter to hold non-ASCII string values

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  3c239834d1c8ae405445a30c01204c02d67ba89c (commit)
      from  bf137c512d98fb91898580f823a78fe4692ba0b7 (commit)


- Log -----------------------------------------------------------------
commit 3c239834d1c8ae405445a30c01204c02d67ba89c
Author: Katsumi Yamaoka <[email protected]>
Date:   Wed Aug 22 10:37:08 2012 +0000

    Enable posting-style group parameter to hold non-ASCII string values

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 01c74b6..6efbb50 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
+2012-08-22  Katsumi Yamaoka  <[email protected]>
+
+	* gnus-cus.el (gnus-group-customize): Decode values posting-style holds.
+	(gnus-group-customize-done): Encode values posting-style holds.
+
+	* gnus-msg.el (gnus-summary-resend-message)
+	(gnus-configure-posting-styles): Decode values posting-style group
+	parameter holds.
+
 2012-08-21  Katsumi Yamaoka  <[email protected]>
 
 	* gnus-msg.el (gnus-summary-resend-message): Honor posting-style for
diff --git a/lisp/gnus-cus.el b/lisp/gnus-cus.el
index 234d0f7..3440e63 100644
--- a/lisp/gnus-cus.el
+++ b/lisp/gnus-cus.el
@@ -417,6 +417,11 @@ category."))
 	    (delq elem tmp))
 	  (setq tmp (cdr tmp))))
 
+      ;; Decode values posting-style holds.
+      (dolist (style (cdr (assq 'posting-style values)))
+	(when (stringp (cadr style))
+	  (setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8)))))
+
       (setq gnus-custom-params
             (apply 'widget-create 'group
                    :value values
@@ -487,14 +492,17 @@ form, but who cares?"
 (defun gnus-group-customize-done (&rest ignore)
   "Apply changes and bury the buffer."
   (interactive)
+  (let ((params (widget-value gnus-custom-params)))
+    ;; Encode values posting-style holds.
+    (dolist (style (cdr (assq 'posting-style params)))
+      (when (stringp (cadr style))
+	(setcdr style (list (mm-encode-coding-string (cadr style) 'utf-8)))))
   (if gnus-custom-topic
-      (gnus-topic-set-parameters gnus-custom-topic
-				 (widget-value gnus-custom-params))
-    (gnus-group-edit-group-done 'params gnus-custom-group
-				(widget-value gnus-custom-params))
+	(gnus-topic-set-parameters gnus-custom-topic params)
+      (gnus-group-edit-group-done 'params gnus-custom-group params)
     (gnus-group-edit-group-done 'method gnus-custom-group
 				(widget-value gnus-custom-method)))
-  (bury-buffer))
+    (bury-buffer)))
 
 ;;; Score Customization:
 
diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el
index 07748be..c2f79e7 100644
--- a/lisp/gnus-msg.el
+++ b/lisp/gnus-msg.el
@@ -1376,6 +1376,9 @@ For the \"inline\" alternatives, also see the variable
 	(user-full-name user-full-name)
 	(user-mail-address user-mail-address)
 	tem)
+    (dolist (style styles)
+      (when (stringp (cadr style))
+	(setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8)))))
     (dolist (style (if styles
 		       (append gnus-posting-styles (list (cons ".*" styles)))
 		     gnus-posting-styles))
@@ -1807,6 +1810,10 @@ this is a reply."
       (when gnus-newsgroup-name
 	(let ((tmp-style (gnus-group-find-parameter group 'posting-style t)))
 	  (when tmp-style
+	    (dolist (style tmp-style)
+	      (when (stringp (cadr style))
+		(setcdr style (list (mm-decode-coding-string (cadr style)
+							     'utf-8)))))
 	    (setq styles (append styles (list (cons ".*" tmp-style)))))))
       ;; Go through all styles and look for matches.
       (dolist (style styles)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog   |    9 +++++++++
 lisp/gnus-cus.el |   24 ++++++++++++++++--------
 lisp/gnus-msg.el |    7 +++++++
 3 files changed, 32 insertions(+), 8 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.