Adjust `gnus-parameters' precedence rules to be more consistent
authorLars Magne Ingebrigtsen <larsi@stories.(none)>
Sat, 7 Jan 2012 00:35:53 +0000 (01:35 +0100)
committerLars Magne Ingebrigtsen <larsi@stories.(none)>
Sat, 7 Jan 2012 00:35:53 +0000 (01:35 +0100)
* gnus.el (gnus-group-fast-parameter): Use the same precedence rules
when getting a single value as when getting all the values.  This means
that atoms like `gcc-self' work cumulatively, like variable settings,
instead of getting the value from the last matching clause.

lisp/ChangeLog
lisp/gnus.el

index 90bc5bb..e1b4abb 100644 (file)
@@ -1,3 +1,10 @@
+2012-01-07  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus.el (gnus-group-fast-parameter): Use the same precedence rules
+       when getting a single value as when getting all the values.  This means
+       that atoms like `gcc-self' work cumulatively, like variable settings,
+       instead of getting the value from the last matching clause.
+
 2012-01-06  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-start.el (gnus-activate-group): Document more parameters
index f532f6f..b0d2027 100644 (file)
@@ -3859,13 +3859,14 @@ The function `gnus-group-find-parameter' will do that for you."
          ;; The car is regexp matching for matching the group name.
          (when (string-match (car head) group)
            ;; The cdr is the parameters.
-           (setq result (gnus-group-parameter-value (cdr head)
-                                                    symbol allow-list))
-           (when result
-             ;; Expand if necessary.
-             (if (and (stringp result) (string-match "\\\\[0-9&]" result))
-                 (setq result (gnus-expand-group-parameter (car head)
-                                                           result group))))))
+           (let ((this-result
+                  (gnus-group-parameter-value (cdr head) symbol allow-list t)))
+             (when this-result
+               (setq result (car this-result))
+               ;; Expand if necessary.
+               (if (and (stringp result) (string-match "\\\\[0-9&]" result))
+                   (setq result (gnus-expand-group-parameter
+                                 (car head) result group)))))))
        ;; Done.
        result))))