From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master b9d6938: Cancel the eldoc timer when switching off eldoc mode Date: Sat, 30 Apr 2016 15:58:07 +0200 Message-ID: <87h9ejqjv4.fsf@gnus.org> References: <20160429200756.7743.70425@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1462024748 2713 80.91.229.3 (30 Apr 2016 13:59:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Apr 2016 13:59:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 30 15:58:58 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1awVQ9-0003xP-Dh for ged-emacs-devel@m.gmane.org; Sat, 30 Apr 2016 15:58:57 +0200 Original-Received: from localhost ([::1]:58512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awVQ5-0004zf-PH for ged-emacs-devel@m.gmane.org; Sat, 30 Apr 2016 09:58:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awVPl-0004i4-7V for emacs-devel@gnu.org; Sat, 30 Apr 2016 09:58:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awVPX-0004Ix-D3 for emacs-devel@gnu.org; Sat, 30 Apr 2016 09:58:25 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:44214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awVPX-0004Gn-7O for emacs-devel@gnu.org; Sat, 30 Apr 2016 09:58:19 -0400 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1awVPL-0002wG-Hf; Sat, 30 Apr 2016 15:58:09 +0200 In-Reply-To: (Stefan Monnier's message of "Sat, 30 Apr 2016 09:36:14 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.224.195 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:203447 Archived-At: Stefan Monnier writes: >> (kill-local-variable 'eldoc-message-commands) >> (remove-hook 'post-command-hook 'eldoc-schedule-timer t) >> - (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t)))) >> + (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t) >> + (when eldoc-timer >> + (cancel-timer eldoc-timer) >> + (setq eldoc-timer nil))))) > > Hmm... IIUC the timer is global (i.e. shared by all buffers), whereas > the above code is run when disabling eldoc-mode in one > particular buffer. So it doesn't look right. As far as I could tell, the post-command-hook in the other buffers should restart the timer if it isn't running. So if you have eldoc mode running in another buffer, it should start again once you do anything in them? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no