[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117517: * lisp/erc/erc-track.el (erc-modified-ch
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs-24 r117517: * lisp/erc/erc-track.el (erc-modified-channels-display): Update all mode lines |
Date: |
Wed, 24 Sep 2014 17:32:07 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117517
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18510
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Wed 2014-09-24 13:31:59 -0400
message:
* lisp/erc/erc-track.el (erc-modified-channels-display): Update all mode lines
if needed. Remove call to erc-modified-channels-object
where we ignored the return value.
(erc-modified-channels-update): Don't force-mode-line-update here any more.
modified:
lisp/erc/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-4305
lisp/erc/erc-track.el
erctrack.el-20091113204419-o5vbwnq5f7feedwu-4342
=== modified file 'lisp/erc/ChangeLog'
--- a/lisp/erc/ChangeLog 2014-02-25 17:37:25 +0000
+++ b/lisp/erc/ChangeLog 2014-09-24 17:31:59 +0000
@@ -1,3 +1,10 @@
+2014-09-24 Stefan Monnier <address@hidden>
+
+ * erc-track.el (erc-modified-channels-display): Update all mode lines
+ if needed (bug#18510). Remove call to erc-modified-channels-object
+ where we ignored the return value.
+ (erc-modified-channels-update): Don't force-mode-line-update here any
more.
+
2014-02-25 Julien Danjou <address@hidden>
* erc-networks.el (erc-determine-network): Check that NETWORK as a
=== modified file 'lisp/erc/erc-track.el'
--- a/lisp/erc/erc-track.el 2014-02-10 01:34:22 +0000
+++ b/lisp/erc/erc-track.el 2014-09-24 17:31:59 +0000
@@ -767,8 +767,7 @@
(erc-modified-channels-remove-buffer buffer))))
erc-modified-channels-alist)
(when removed-channel
- (erc-modified-channels-display)
- (force-mode-line-update t)))
+ (erc-modified-channels-display)))
(remove-hook 'post-command-hook 'erc-modified-channels-update)))
(defvar erc-track-mouse-face (if (featurep 'xemacs)
@@ -825,43 +824,45 @@
((eq 'importance erc-track-switch-direction)
(erc-track-sort-by-importance)))
(run-hooks 'erc-track-list-changed-hook)
- (unless (eq erc-track-position-in-mode-line nil)
- (if (null erc-modified-channels-alist)
- (setq erc-modified-channels-object (erc-modified-channels-object nil))
- ;; erc-modified-channels-alist contains all the data we need. To
- ;; better understand what is going on, we split things up into
- ;; four lists: BUFFERS, COUNTS, SHORT-NAMES, and FACES. These
- ;; four lists we use to create a new
- ;; `erc-modified-channels-object' using
- ;; `erc-make-mode-line-buffer-name'.
- (let* ((buffers (mapcar 'car erc-modified-channels-alist))
- (counts (mapcar 'cadr erc-modified-channels-alist))
- (faces (mapcar 'cddr erc-modified-channels-alist))
- (long-names (mapcar #'(lambda (buf)
- (or (buffer-name buf)
- ""))
- buffers))
- (short-names (if (functionp erc-track-shorten-function)
- (funcall erc-track-shorten-function
- long-names)
- long-names))
- strings)
- (while buffers
- (when (car short-names)
- (setq strings (cons (erc-make-mode-line-buffer-name
- (car short-names)
- (car buffers)
- (car faces)
- (car counts))
- strings)))
- (setq short-names (cdr short-names)
- buffers (cdr buffers)
- counts (cdr counts)
- faces (cdr faces)))
- (when (featurep 'xemacs)
- (erc-modified-channels-object nil))
- (setq erc-modified-channels-object
- (erc-modified-channels-object strings))))))
+ (when erc-track-position-in-mode-line
+ (let* ((oldobject erc-modified-channels-object)
+ (strings
+ (when erc-modified-channels-alist
+ ;; erc-modified-channels-alist contains all the data we need. To
+ ;; better understand what is going on, we split things up into
+ ;; four lists: BUFFERS, COUNTS, SHORT-NAMES, and FACES. These
+ ;; four lists we use to create a new
+ ;; `erc-modified-channels-object' using
+ ;; `erc-make-mode-line-buffer-name'.
+ (let* ((buffers (mapcar 'car erc-modified-channels-alist))
+ (counts (mapcar 'cadr erc-modified-channels-alist))
+ (faces (mapcar 'cddr erc-modified-channels-alist))
+ (long-names (mapcar #'(lambda (buf)
+ (or (buffer-name buf)
+ ""))
+ buffers))
+ (short-names (if (functionp erc-track-shorten-function)
+ (funcall erc-track-shorten-function
+ long-names)
+ long-names))
+ strings)
+ (while buffers
+ (when (car short-names)
+ (setq strings (cons (erc-make-mode-line-buffer-name
+ (car short-names)
+ (car buffers)
+ (car faces)
+ (car counts))
+ strings)))
+ (setq short-names (cdr short-names)
+ buffers (cdr buffers)
+ counts (cdr counts)
+ faces (cdr faces)))
+ strings)))
+ (newobject (erc-modified-channels-object strings)))
+ (unless (equal oldobject newobject)
+ (setq erc-modified-channels-object newobject)
+ (force-mode-line-update t)))))
(defun erc-modified-channels-remove-buffer (buffer)
"Remove BUFFER from `erc-modified-channels-alist'."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117517: * lisp/erc/erc-track.el (erc-modified-channels-display): Update all mode lines,
Stefan Monnier <=