[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Little improvements on pulse.el
From: |
Juri Linkov |
Subject: |
Re: Little improvements on pulse.el |
Date: |
Wed, 10 Mar 2021 19:18:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> 2. The name and the docstring mention the use with hooks, but would be
>>> nice to use with advices as well. For example, to highlight the current
>>> line when the cursor, buffer or window changes:
> [...]
>>
>> I'd prefer not to use advices for such a simple job. For example, how
>> about defining a new hook, which will receive the argument(s) you want
>> to pass it?
>
> Besides the implementation details, how about packing this up in a
> global minor mode, like `pulse-change-window-mode' or something?
> I could see myself using something like that.
Maybe simply something like:
(defun pulse-line (&rest _)
(pulse-momentary-highlight-one-line (point)))
(add-hook 'window-state-change-functions #'pulse-line)
or
(add-hook 'window-configuration-change-hook #'pulse-line)
Re: Little improvements on pulse.el, Juri Linkov, 2021/03/10
Re: Little improvements on pulse.el, Stefan Monnier, 2021/03/11