diff options
| author | Katsumi Yamaoka | 2012-08-22 10:37:55 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2012-08-22 10:37:55 +0000 |
| commit | 3b7bf1d45b5ad46222cd64071af110c5ce3bb007 (patch) | |
| tree | 6d87257666fbadd4aad14a573068e2eac8fd512c | |
| parent | bfef4149cf6451bdd888dace455214c51914ec42 (diff) | |
| download | emacs-3b7bf1d45b5ad46222cd64071af110c5ce3bb007.tar.gz emacs-3b7bf1d45b5ad46222cd64071af110c5ce3bb007.zip | |
[Gnus] Enable posting-style group parameter to hold non-ASCII string values
| -rw-r--r-- | lisp/gnus/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/gnus/gnus-cus.el | 24 | ||||
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 7 |
3 files changed, 32 insertions, 8 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7592c405076..2a47b049c9b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2012-08-22 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-cus.el (gnus-group-customize): Decode values posting-style holds. | ||
| 4 | (gnus-group-customize-done): Encode values posting-style holds. | ||
| 5 | |||
| 6 | * gnus-msg.el (gnus-summary-resend-message) | ||
| 7 | (gnus-configure-posting-styles): Decode values posting-style group | ||
| 8 | parameter holds. | ||
| 9 | |||
| 1 | 2012-08-21 Katsumi Yamaoka <yamaoka@jpl.org> | 10 | 2012-08-21 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 11 | ||
| 3 | * gnus-msg.el (gnus-summary-resend-message): Honor posting-style for | 12 | * gnus-msg.el (gnus-summary-resend-message): Honor posting-style for |
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index 234d0f7ae56..3440e6310af 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el | |||
| @@ -417,6 +417,11 @@ category.")) | |||
| 417 | (delq elem tmp)) | 417 | (delq elem tmp)) |
| 418 | (setq tmp (cdr tmp)))) | 418 | (setq tmp (cdr tmp)))) |
| 419 | 419 | ||
| 420 | ;; Decode values posting-style holds. | ||
| 421 | (dolist (style (cdr (assq 'posting-style values))) | ||
| 422 | (when (stringp (cadr style)) | ||
| 423 | (setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8))))) | ||
| 424 | |||
| 420 | (setq gnus-custom-params | 425 | (setq gnus-custom-params |
| 421 | (apply 'widget-create 'group | 426 | (apply 'widget-create 'group |
| 422 | :value values | 427 | :value values |
| @@ -487,14 +492,17 @@ form, but who cares?" | |||
| 487 | (defun gnus-group-customize-done (&rest ignore) | 492 | (defun gnus-group-customize-done (&rest ignore) |
| 488 | "Apply changes and bury the buffer." | 493 | "Apply changes and bury the buffer." |
| 489 | (interactive) | 494 | (interactive) |
| 490 | (if gnus-custom-topic | 495 | (let ((params (widget-value gnus-custom-params))) |
| 491 | (gnus-topic-set-parameters gnus-custom-topic | 496 | ;; Encode values posting-style holds. |
| 492 | (widget-value gnus-custom-params)) | 497 | (dolist (style (cdr (assq 'posting-style params))) |
| 493 | (gnus-group-edit-group-done 'params gnus-custom-group | 498 | (when (stringp (cadr style)) |
| 494 | (widget-value gnus-custom-params)) | 499 | (setcdr style (list (mm-encode-coding-string (cadr style) 'utf-8))))) |
| 495 | (gnus-group-edit-group-done 'method gnus-custom-group | 500 | (if gnus-custom-topic |
| 496 | (widget-value gnus-custom-method))) | 501 | (gnus-topic-set-parameters gnus-custom-topic params) |
| 497 | (bury-buffer)) | 502 | (gnus-group-edit-group-done 'params gnus-custom-group params) |
| 503 | (gnus-group-edit-group-done 'method gnus-custom-group | ||
| 504 | (widget-value gnus-custom-method))) | ||
| 505 | (bury-buffer))) | ||
| 498 | 506 | ||
| 499 | ;;; Score Customization: | 507 | ;;; Score Customization: |
| 500 | 508 | ||
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 07748bebb81..c2f79e70d1e 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -1376,6 +1376,9 @@ For the \"inline\" alternatives, also see the variable | |||
| 1376 | (user-full-name user-full-name) | 1376 | (user-full-name user-full-name) |
| 1377 | (user-mail-address user-mail-address) | 1377 | (user-mail-address user-mail-address) |
| 1378 | tem) | 1378 | tem) |
| 1379 | (dolist (style styles) | ||
| 1380 | (when (stringp (cadr style)) | ||
| 1381 | (setcdr style (list (mm-decode-coding-string (cadr style) 'utf-8))))) | ||
| 1379 | (dolist (style (if styles | 1382 | (dolist (style (if styles |
| 1380 | (append gnus-posting-styles (list (cons ".*" styles))) | 1383 | (append gnus-posting-styles (list (cons ".*" styles))) |
| 1381 | gnus-posting-styles)) | 1384 | gnus-posting-styles)) |
| @@ -1807,6 +1810,10 @@ this is a reply." | |||
| 1807 | (when gnus-newsgroup-name | 1810 | (when gnus-newsgroup-name |
| 1808 | (let ((tmp-style (gnus-group-find-parameter group 'posting-style t))) | 1811 | (let ((tmp-style (gnus-group-find-parameter group 'posting-style t))) |
| 1809 | (when tmp-style | 1812 | (when tmp-style |
| 1813 | (dolist (style tmp-style) | ||
| 1814 | (when (stringp (cadr style)) | ||
| 1815 | (setcdr style (list (mm-decode-coding-string (cadr style) | ||
| 1816 | 'utf-8))))) | ||
| 1810 | (setq styles (append styles (list (cons ".*" tmp-style))))))) | 1817 | (setq styles (append styles (list (cons ".*" tmp-style))))))) |
| 1811 | ;; Go through all styles and look for matches. | 1818 | ;; Go through all styles and look for matches. |
| 1812 | (dolist (style styles) | 1819 | (dolist (style styles) |