* gnus.el (gnus-group-parameter-value): Take an extra param.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 2 Jan 2003 08:22:58 +0000 (08:22 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 2 Jan 2003 08:22:58 +0000 (08:22 +0000)
(gnus-group-fast-parameter): Let group param results be nil.

lisp/ChangeLog
lisp/gnus-start.el
lisp/gnus.el

index ea673d0..207f674 100644 (file)
@@ -1,5 +1,8 @@
 2003-01-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus.el (gnus-group-parameter-value): Take an extra param.
+       (gnus-group-fast-parameter): Let group param results be nil. 
+
        * gnus-art.el (gnus-article-forward-header): New function.
        (article-date-ut): Use it to remove continuation date headers. 
 
index d5a9859..ecfdabc 100644 (file)
@@ -1574,7 +1574,7 @@ newsgroup."
                 (t 0))
           level))
         scanned-methods info group active method retrieve-groups)
-    (gnus-message 5 "Checking new news...")
+    (gnus-message 6 "Checking new news...")
 
     (while newsrc
       (setq active (gnus-active (setq group (gnus-info-group
@@ -1682,7 +1682,7 @@ newsgroup."
              (gnus-set-active group nil)
              (setcar (gnus-gethash group gnus-newsrc-hashtb) t)))))))
 
-    (gnus-message 5 "Checking new news...done")))
+    (gnus-message 6 "Checking new news...done")))
 
 ;; Create a hash table out of the newsrc alist.  The `car's of the
 ;; alist elements are used as keys.
index 44e5f72..f5ffcfb 100644 (file)
@@ -3174,9 +3174,13 @@ You should probably use `gnus-find-method-for-group' instead."
 You should call this in the `gnus-group-buffer' buffer.
 The function `gnus-group-find-parameter' will do that for you."
   ;; The speed trick:  No cons'ing and quit early.
-  (or (let ((params (funcall gnus-group-get-parameter-function group)))
-       ;; Start easy, check the "real" group parameters.
-       (gnus-group-parameter-value params symbol allow-list))
+  (let* ((params (funcall gnus-group-get-parameter-function group))
+        ;; Start easy, check the "real" group parameters.
+        (simple-results
+         (gnus-group-parameter-value params symbol allow-list t)))
+    (if simple-results
+       ;; Found results; return them.
+       (car simple-results)
       ;; We didn't found it there, try `gnus-parameters'.
       (let ((result nil)
            (head nil)
@@ -3198,7 +3202,7 @@ The function `gnus-group-find-parameter' will do that for you."
              ;; Exit the loop early.
              (setq tail nil))))
        ;; Done.
-       result)))
+       result))))
 
 (defun gnus-group-find-parameter (group &optional symbol allow-list)
   "Return the group parameters for GROUP.
@@ -3225,7 +3229,8 @@ also examines the topic parameters."
        (gnus-group-parameter-value params symbol allow-list)
       params)))
 
-(defun gnus-group-parameter-value (params symbol &optional allow-list)
+(defun gnus-group-parameter-value (params symbol &optional
+                                         allow-list present-p)
   "Return the value of SYMBOL in group PARAMS."
   ;; We only wish to return group parameters (dotted lists) and
   ;; not local variables, which may have the same names.
@@ -3239,7 +3244,8 @@ also examines the topic parameters."
                       (eq (car elem) symbol)
                       (or allow-list
                           (atom (cdr elem))))
-             (throw 'found (cdr elem))))))))
+             (throw 'found (if present-p (list (cdr elem))
+                             (cdr elem)))))))))
 
 (defun gnus-group-add-parameter (group param)
   "Add parameter PARAM to GROUP."