[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical
From: |
Stefan Monnier |
Subject: |
Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk |
Date: |
Mon, 01 Feb 2021 21:58:36 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Katsumi Yamaoka [2021-02-02 09:44:57] wrote:
> On Sun, 31 Jan 2021 17:39:54 -0500, Stefan Monnier wrote:
>> branch: master
>> commit 11abc4aef42ceaea451c264e5a7292e765d4f31b
>> Merge: cb72b83 d2341eb
>> Author: Stefan Monnier <monnier@iro.umontreal.ca>
>> Commit: Stefan Monnier <monnier@iro.umontreal.ca>
>
>> Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk
>
> It's not a bug but my custom face setting got to malfunction by
> this change,
I think it *is* a bug ;-)
> i.e., to turn lexical-binding on on the gnus files.
> My custom face setting is something like the following:
>
> (push '((string-match "REGEX" group) . custom-face)
> gnus-group-highlight)
Indeed, I see that `gnus-group-highlight`s docstring explicitly mentions
`group` as a variable that can be used there, so we should include it.
> Where `group' is a group name; it aimed to highlight groups of
> which the name match "REGEX" by `custom-face' in the Group buffer.
> However, `group' is no longer a bound variable now. So, I'd like
> to add `group' to an env list in `gnus-group-update-eval-form' as
> the patch below. Is it ok? Thanks.
Looking at the docstring, I see that `method` is also missing, and on
the flip side, I see that additionally to what the docstring mentions,
the code provides `total` and `group-age`.
Could someone help me figure out what should happen with those
extra vars?
Should `total` and/or `group-age` be removed from the code in
`gnus-group-update-eval-form`, or should they instead be documented in
the docstring of `gnus-group-highlight` and, if so, saying what?
Stefan
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 3661b6376d..25abb911a6 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -367,13 +367,15 @@ gnus-group-highlight
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': ??
+`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': ??"
:group 'gnus-group-visual
:type '(repeat (cons (sexp :tag "Form") face)))
(put 'gnus-group-highlight 'risky-local-variable t)
@@ -401,16 +403,8 @@ gnus-group-icon-list
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 those of `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 +1618,9 @@ gnus-group-update-eval-form
(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
- Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk, Katsumi Yamaoka, 2021/02/01
- Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk,
Stefan Monnier <=
- Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk, Richard Stallman, 2021/02/02
- Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk, Tassilo Horn, 2021/02/02
- Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk, tomas, 2021/02/02
- Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk, Eli Zaretskii, 2021/02/02
- Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk, tomas, 2021/02/02
- Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk, Eli Zaretskii, 2021/02/02
- git things [was: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk], tomas, 2021/02/02
- Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk, Richard Stallman, 2021/02/03
- Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk, Andreas Schwab, 2021/02/02
- Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk, Eli Zaretskii, 2021/02/02