emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 291bcb5 2/2: ERC: Track: Fix a perceived minor bug in mode line f


From: Amin Bandali
Subject: master 291bcb5 2/2: ERC: Track: Fix a perceived minor bug in mode line face selection
Date: Sun, 12 Sep 2021 01:21:18 -0400 (EDT)

branch: master
commit 291bcb5973230c36f9cec6f9fa91b553d944ccd2
Author: Olivier Certner <olce.emacs@certner.fr>
Commit: Amin Bandali <bandali@gnu.org>

    ERC: Track: Fix a perceived minor bug in mode line face selection
    
    * lisp/erc/erc-track.el (erc-track-modified-channels): Fix what is a
    probable bug when a new insert event happens for a buffer that was not
    tracked or for which no mode line face was selected: in this case,
    stop treating the latest buffer's face (first in list) as the previous
    one, which could be overridden with an older one (in FACES' rest), as
    if it had happened after.
---
 lisp/erc/erc-track.el | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index 7b9a2e9..2582a50 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -818,18 +818,15 @@ is in `erc-mode'."
                      (cons (cons (current-buffer)
                                  (cons
                                    1 (erc-track-select-mode-line-face
-                                      (car faces) (cdr faces))))
+                                      nil faces)))
                            erc-modified-channels-alist))
              ;; Else modify the face for the buffer, if necessary.
              (when faces
                (let* ((cell (assq (current-buffer)
                                   erc-modified-channels-alist))
                       (old-face (cddr cell))
-                      (new-face (if old-face
-                                     (erc-track-select-mode-line-face
-                                      old-face faces)
-                                   (erc-track-select-mode-line-face
-                                    (car faces) (cdr faces)))))
+                      (new-face (erc-track-select-mode-line-face
+                                  old-face faces)))
                  (setcdr cell (cons (1+ (cadr cell)) new-face)))))
            ;; And display it
            (erc-modified-channels-display)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]