]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/gnus/gnus-group.el: Fix a regression due to lexical scoping
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 2 Feb 2021 19:12:17 +0000 (14:12 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 2 Feb 2021 19:12:17 +0000 (14:12 -0500)
(gnus-group-highlight): Improve docstring.
(gnus-group-update-eval-form): Add `group` and `method` to the vars
provided to `eval`.

lisp/gnus/gnus-group.el

index 3661b6376df2ccd6c71b54ca37898d29c56e159a..e8b62a4133ec8f1b8b148702f4441936a35a00f9 100644 (file)
@@ -367,13 +367,16 @@ requires an understanding of Lisp expressions.  Hopefully this will
 change in a future release.  For now, you can use the following
 variables in the Lisp expression:
 
-group: The name of the group.
-unread: The number of unread articles in the group.
-method: The select method used.
-mailp: Whether it's a mail group or not.
-level: The level of the group.
-score: The score of the group.
-ticked: The number of ticked articles."
+`group':     The name of the group.
+`unread':    The number of unread articles in the group.
+`method':    The select method used.
+`total':     The total number of articles in the group.
+`mailp':     Whether it's a mail group or not.
+`level':     The level of the group.
+`score':     The score of the group.
+`ticked':    The number of ticked articles.
+`group-age': Time in seconds since the group was last read
+           (see info node `(gnus)Group Timestamp')."
   :group 'gnus-group-visual
   :type '(repeat (cons (sexp :tag "Form") face)))
 (put 'gnus-group-highlight 'risky-local-variable t)
@@ -401,16 +404,8 @@ file.
 
 It is also possible to change and add form fields, but currently that
 requires an understanding of Lisp expressions.  Hopefully this will
-change in a future release.  For now, you can use the following
-variables in the Lisp expression:
-
-group: The name of the group.
-unread: The number of unread articles in the group.
-method: The select method used.
-mailp: Whether it's a mail group or not.
-level: The level of the group.
-score: The score of the group.
-ticked: The number of ticked articles."
+change in a future release.  For now, you can use the same
+variables in the Lisp expression as in `gnus-group-highlight'."
   :group 'gnus-group-icons
   :type '(repeat (cons (sexp :tag "Form") file)))
 (put 'gnus-group-icon-list 'risky-local-variable t)
@@ -1624,7 +1619,9 @@ Some value are bound so the form can use them."
            (marked (gnus-info-marks info))
           (env
            (list
+            (cons 'group group)
             (cons 'unread (if (numberp (car entry)) (car entry) 0))
+            (cons 'method method)
             (cons 'total (if active (1+ (- (cdr active) (car active))) 0))
             (cons 'mailp (apply
                           #'append