emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] New package: on-screen


From: Michael Heerdegen
Subject: Re: [ELPA] New package: on-screen
Date: Wed, 21 Oct 2015 21:04:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

"John Wiegley" <address@hidden> writes:

> Just two comments:

That was quick!  Thanks for having a look.

>
>   (let ((method `(,on-screen-highlight-method . ,on-screen-inverse-flag)))
>
> Is the same as:
>
>   (let ((method (const on-screen-highlight-method
> on-screen-inverse-flag)))

I guess you mean `cons' ;-)  Then I agree.

> The other one is a matter of affecting the global environment. In
> `on-screen-initialize', you should pass `t' as a 3rd argument to
> add-hook, so the hooks are only affected in buffers where on-screen
> mode is active.

This is a actually an intended design choice.  What you suggest is not
sufficient if you scroll the "other" buffer via M-next/M-prior, or
scroll any buffer "with the mouse wheel" that is not current, but has
the mode on.  Then you still want to see the highlighting effect.

Another common use case is reading news with Gnus and scrolling the
article buffer with RET or Space: the summary buffer is current, but you
are reading, and scrolling the article buffer, which has the mode turned
on.

So, to avoid unnecessary complication, I decided to install my stuff in
the global hooks.  If you don't have any buffer with `on-screen-mode'
turned on visible, there is no performance loss this way, so I decided
that's acceptable.


Thanks,

Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]