From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding Date: Fri, 17 May 2019 12:48:02 -0400 Message-ID: References: <20190515175318.10237.53148@vcs0.savannah.gnu.org> <20190515175319.ACE4B20537@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="184391"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Stefan Monnier To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 17 19:02:20 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRgFP-000lji-84 for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 19:02:19 +0200 Original-Received: from localhost ([127.0.0.1]:51309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRgFN-0003YZ-O8 for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 13:02:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRgCI-0001by-5q for emacs-devel@gnu.org; Fri, 17 May 2019 12:59:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRg1f-0004LR-GP for emacs-devel@gnu.org; Fri, 17 May 2019 12:48:08 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:63431) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRg1f-0004Fu-9A for emacs-devel@gnu.org; Fri, 17 May 2019 12:48:07 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0F2A480B9E; Fri, 17 May 2019 12:48:05 -0400 (EDT) Original-Received: from mail02.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 85252803A8; Fri, 17 May 2019 12:48:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1558111683; bh=Y8J6l/j89luLCuSA+gma3c/1578phUsXaPOFNdbHI2w=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=HpwbTtfZIepeUoN0Eurv4mdFmo8D6kMcVgJZK7cG/xXXZTzcrtyVD56vGMyGaJyem K2bxoAXy1NbX9ZYuZk06VPLJxlvcec86jG2oe/6y1tAJto4utvq1A8W4/io86XXar6 e04jfL6jpWUi4VCdAEu651xIN79FcLAoEL6n5wBMv1WfLQpcffKrlqdEyOE63h44L4 V+INe5+XtkoZSe3f1PrsJsEV/TrrxgT5kU0pgEWctte7mXTUhWHVQcopwW64r1w0I1 pYhHTdoelp+grnqaZh6ZEii81XYw6hWWDuGkHNfkMGqrBwnAu53fGw0Vt0gDyMSLDB gnW92d/j4WbxQ== Original-Received: from ceviche (184-175-13-248.dsl.teksavvy.com [184.175.13.248]) by mail02.iro.umontreal.ca (Postfix) with ESMTPSA id 4EA1E1207BB; Fri, 17 May 2019 12:48:03 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Fri, 17 May 2019 12:45:12 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236680 Archived-At: > Indeed, thanks. Does the patch below work for you? I meant this one, Stefan diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index f761fdb794..556fb63a07 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -50,6 +50,7 @@ gnus-tmp-score (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 @@ gnus-summary-line-format-alist (?\< (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 @@ gnus-summary-insert-line (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 @@ gnus-summary-prepare-threads 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 @@ gnus-summary-prepare-threads (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))