[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master b9d6938: Cancel the eldoc timer when switching
From: |
Lars Ingebrigtsen |
Subject: |
Re: [Emacs-diffs] master b9d6938: Cancel the eldoc timer when switching off eldoc mode |
Date: |
Sat, 30 Apr 2016 15:58:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Stefan Monnier <address@hidden> 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