X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-cus.el;h=3440e6310af3307e2bc0a29844fc4510091afbde;hb=3c239834d1c8ae405445a30c01204c02d67ba89c;hp=6da91bdc266e155994fb32c8760c43cfef69c1e1;hpb=079381a6c84bf3dfeffb3efbea4b4904a3bee940;p=gnus diff --git a/lisp/gnus-cus.el b/lisp/gnus-cus.el index 6da91bdc2..3440e6310 100644 --- a/lisp/gnus-cus.el +++ b/lisp/gnus-cus.el @@ -1,7 +1,6 @@ ;;; gnus-cus.el --- customization commands for Gnus -;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1999-2012 Free Software Foundation, Inc. ;; Author: Per Abrahamsen ;; Keywords: news @@ -418,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 @@ -488,14 +492,17 @@ form, but who cares?" (defun gnus-group-customize-done (&rest ignore) "Apply changes and bury the buffer." (interactive) - (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-group-edit-group-done 'method gnus-custom-group - (widget-value gnus-custom-method))) - (bury-buffer)) + (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 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))) ;;; Score Customization: @@ -923,7 +930,7 @@ will add a new `thread' match for each article that has X in its `Message-ID's of these matching articles.) This will ensure that you can raise/lower the score of an entire thread, even though some articles in the thread may not have complete `References' headers. -Note that using this may lead to undeterministic scores of the +Note that using this may lead to nondeterministic scores of the articles in the thread. ") ,@types) @@ -1035,19 +1042,19 @@ articles in the thread. (widget-create 'push-button :notify - '(lambda (&rest ignore) - (let* ((info (assq gnus-agent-cat-name gnus-category-alist)) - (widgets category-fields)) - (while widgets - (let* ((widget (pop widgets)) - (value (condition-case nil (widget-value widget) (error)))) - (eval `(setf (,(widget-get widget :accessor) ',info) - ',value))))) - (gnus-category-write) - (gnus-kill-buffer (current-buffer)) - (when (get-buffer gnus-category-buffer) - (switch-to-buffer (get-buffer gnus-category-buffer)) - (gnus-category-list))) + (lambda (&rest ignore) + (let* ((info (assq gnus-agent-cat-name gnus-category-alist)) + (widgets category-fields)) + (while widgets + (let* ((widget (pop widgets)) + (value (condition-case nil (widget-value widget) (error)))) + (eval `(setf (,(widget-get widget :accessor) ',info) + ',value))))) + (gnus-category-write) + (gnus-kill-buffer (current-buffer)) + (when (get-buffer gnus-category-buffer) + (switch-to-buffer (get-buffer gnus-category-buffer)) + (gnus-category-list))) "Done") (widget-insert "\n Note: Empty fields default to the customizable global\