From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.devel Subject: [PATCH] erc-track erases the modeline when new buffers are created Date: Fri, 13 Aug 2010 23:57:02 +0100 Message-ID: <87r5i26s01.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1281740243 15342 80.91.229.12 (13 Aug 2010 22:57:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 Aug 2010 22:57:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 14 00:57:23 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ok3Bi-0007cY-3G for ged-emacs-devel@m.gmane.org; Sat, 14 Aug 2010 00:57:22 +0200 Original-Received: from localhost ([127.0.0.1]:44834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ok3Bh-0004Hj-LD for ged-emacs-devel@m.gmane.org; Fri, 13 Aug 2010 18:57:21 -0400 Original-Received: from [140.186.70.92] (port=39572 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ok3Bb-0004HZ-Go for emacs-devel@gnu.org; Fri, 13 Aug 2010 18:57:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ok3Ba-0007Oh-CL for emacs-devel@gnu.org; Fri, 13 Aug 2010 18:57:15 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:41584) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ok3Ba-0007Oa-3q for emacs-devel@gnu.org; Fri, 13 Aug 2010 18:57:14 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ok3BW-0007a0-Nr for emacs-devel@gnu.org; Sat, 14 Aug 2010 00:57:10 +0200 Original-Received: from ns2dhcp091.hertford.ox.ac.uk ([163.1.230.91]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Aug 2010 00:57:10 +0200 Original-Received: from antoine.levitt by ns2dhcp091.hertford.ox.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Aug 2010 00:57:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 23 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ns2dhcp091.hertford.ox.ac.uk User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:RC+sCYS9szI96LcZAmfopob8zSY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:128638 Archived-At: When a new ERC buffer is created (for instance, a query) while erc-track displays information in the mode line, the information is removed. I tracked the bug down to an initialisation of erc-modified-channels-object each time erc-track-mode is activated (ie, each time an ERC buffer is created). This is useless because the variable is initialised at load time with (defvar). This patch simply removes the extra initialisation. I tested it, it works for me and I don't see any potential bugs the removal might cause. Antoine Levitt === modified file 'lisp/erc/erc-track.el' --- lisp/erc/erc-track.el 2010-01-13 08:35:10 +0000 +++ lisp/erc/erc-track.el 2010-08-13 22:47:20 +0000 @@ -649,7 +649,6 @@ (add-hook 'erc-send-completed-hook 'erc-user-is-active) (add-hook 'erc-server-001-functions 'erc-user-is-active)) (erc-track-add-to-mode-line erc-track-position-in-mode-line) - (setq erc-modified-channels-object (erc-modified-channels-object nil)) (erc-update-mode-line) (if (featurep 'xemacs) (defadvice switch-to-buffer (after erc-update (&rest args) activate)