[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4fbcecf: * lisp/gnus/gnus-sum.el (gnus-tmp-thread):
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master 4fbcecf: * lisp/gnus/gnus-sum.el (gnus-tmp-thread): New var |
Date: |
Fri, 17 May 2019 14:42:44 -0400 (EDT) |
branch: master
commit 4fbcecfaef8a3773b605c183c4da66cdabb39eef
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* lisp/gnus/gnus-sum.el (gnus-tmp-thread): New var
The recent change to use lexical-binding introduced a bug because
gnus-summary-line-format-alist refers to variable `thread` which is now
lexical and hence not available there any more. Replace it with
a dynamically scoped var `gnus-tmp-thread` as was already done with
all other vars.
(gnus-summary-line-format-alist): Use it instead of `thread`.
(gnus-summary-prepare-threads): Bind it around call to (eval
gnus-summary-line-format-spec).
---
lisp/gnus/gnus-sum.el | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index f761fdb..556fb63 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -50,6 +50,7 @@
(defvar gnus-tmp-score-char)
(defvar gnus-tmp-subject)
(defvar gnus-tmp-subject-or-nil)
+(defvar gnus-tmp-thread)
(defvar gnus-tmp-unread)
(defvar gnus-tmp-unread-and-unselected)
(defvar gnus-tmp-unread-and-unticked)
@@ -1443,15 +1444,17 @@ the normal Gnus MIME machinery."
(?\< (make-string (max 0 (- 20 gnus-tmp-level)) ? ) ?s)
(?i gnus-tmp-score ?d)
(?z gnus-tmp-score-char ?c)
- (?V (gnus-thread-total-score (and (boundp 'thread) (car thread))) ?d)
+ (?V (gnus-thread-total-score
+ (and (boundp 'gnus-tmp-thread) (car gnus-tmp-thread)))
+ ?d)
(?U gnus-tmp-unread ?c)
(?f (gnus-summary-from-or-to-or-newsgroups gnus-tmp-header gnus-tmp-from)
?s)
(?t (gnus-summary-number-of-articles-in-thread
- (and (boundp 'thread) (car thread)) gnus-tmp-level)
+ (and (boundp 'gnus-tmp-thread) (car gnus-tmp-thread)) gnus-tmp-level)
?d)
(?e (gnus-summary-number-of-articles-in-thread
- (and (boundp 'thread) (car thread)) gnus-tmp-level t)
+ (and (boundp 'gnus-tmp-thread) (car gnus-tmp-thread)) gnus-tmp-level t)
?c)
(?u gnus-tmp-user-defined ?s)
(?P (gnus-pick-line-number) ?d)
@@ -3786,9 +3789,9 @@ buffer that was in action when the last article was
fetched."
(setq gnus-tmp-name gnus-tmp-from))
(unless (numberp gnus-tmp-lines)
(setq gnus-tmp-lines -1))
- (if (= gnus-tmp-lines -1)
- (setq gnus-tmp-lines "?")
- (setq gnus-tmp-lines (number-to-string gnus-tmp-lines)))
+ (setq gnus-tmp-lines (if (= gnus-tmp-lines -1)
+ "?"
+ (number-to-string gnus-tmp-lines)))
(condition-case ()
(put-text-property
(point)
@@ -5265,7 +5268,7 @@ or a straight list of headers."
gnus-tmp-header gnus-tmp-unread gnus-tmp-downloaded
gnus-tmp-replied gnus-tmp-subject-or-nil
gnus-tmp-dummy gnus-tmp-indentation gnus-tmp-lines gnus-tmp-score
- gnus-tmp-score-char gnus-tmp-from gnus-tmp-name
+ gnus-tmp-score-char gnus-tmp-from gnus-tmp-name gnus-tmp-thread
gnus-tmp-number gnus-tmp-opening-bracket gnus-tmp-closing-bracket
tree-stack)
@@ -5516,9 +5519,10 @@ or a straight list of headers."
(setq gnus-tmp-name gnus-tmp-from))
(unless (numberp gnus-tmp-lines)
(setq gnus-tmp-lines -1))
- (if (= gnus-tmp-lines -1)
- (setq gnus-tmp-lines "?")
- (setq gnus-tmp-lines (number-to-string gnus-tmp-lines)))
+ (setq gnus-tmp-lines (if (= gnus-tmp-lines -1)
+ "?"
+ (number-to-string gnus-tmp-lines)))
+ (setq gnus-tmp-thread thread)
(put-text-property
(point)
(progn (eval gnus-summary-line-format-spec) (point))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4fbcecf: * lisp/gnus/gnus-sum.el (gnus-tmp-thread): New var,
Stefan Monnier <=