[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `auto-dim-other-windows` -- scrutiny invited
From: |
Óscar Fuentes |
Subject: |
Re: `auto-dim-other-windows` -- scrutiny invited |
Date: |
Wed, 03 Apr 2013 20:10:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Steven Degutis <sbdegutis@gmail.com> writes:
> So it's more conventional to use a minor-mode to do this than just two
> functions?
>
> If so, is it considerably more difficult to implement it as a minor-mode?
> And would the code look any cleaner?
>From the POV of the user a minor mode is an standard interface for
customizing Emacs with active features. For instance, he can query Emacs
about which modes are active at any moment (M-x describe-mode). Emacs
provides some sugar for making it easy to implement minor modes. A minor
mode for this feature would be quite simple and could be implemented
with something like (not tested):
(define-minor-mode auto-dim-other-windows-mode
"Dim the background of non-selected windows
blah, blah, blah (more info here)"
(if auto-dim-other-windows-mode
(auto-dim-other-windows-mode-disable)
(auto-dim-other-windows-mode-enable))
where auto-dim-other-windows-mode-enable/disable are the functions your
current implementation is using.
As you can see, the code overhead is minimal.
- Re: `auto-dim-other-windows` -- scrutiny invited, (continued)
Re: `auto-dim-other-windows` -- scrutiny invited, Óscar Fuentes, 2013/04/03
- Re: `auto-dim-other-windows` -- scrutiny invited, Steven Degutis, 2013/04/03
- Re: `auto-dim-other-windows` -- scrutiny invited, Steven Degutis, 2013/04/03
- Re: `auto-dim-other-windows` -- scrutiny invited, Óscar Fuentes, 2013/04/03
- Re: `auto-dim-other-windows` -- scrutiny invited, Steven Degutis, 2013/04/03
- Re: `auto-dim-other-windows` -- scrutiny invited, Óscar Fuentes, 2013/04/03
- Re: `auto-dim-other-windows` -- scrutiny invited, Steven Degutis, 2013/04/03
- Re: `auto-dim-other-windows` -- scrutiny invited,
Óscar Fuentes <=
- Re: `auto-dim-other-windows` -- scrutiny invited, Steven Degutis, 2013/04/03
- Re: `auto-dim-other-windows` -- scrutiny invited, Steven Degutis, 2013/04/03
Re: `auto-dim-other-windows` -- scrutiny invited, Stefan Monnier, 2013/04/03
Re: `auto-dim-other-windows` -- scrutiny invited, Steven Degutis, 2013/04/03
Re: `auto-dim-other-windows` -- scrutiny invited, Stefan Monnier, 2013/04/03
RE: `auto-dim-other-windows` -- scrutiny invited, Drew Adams, 2013/04/04
Re: `auto-dim-other-windows` -- scrutiny invited, Steven Degutis, 2013/04/04
Re: `auto-dim-other-windows` -- scrutiny invited, Stefan Monnier, 2013/04/06
RE: `auto-dim-other-windows` -- scrutiny invited, Drew Adams, 2013/04/06
Message not availableRe: `auto-dim-other-windows` -- scrutiny invited, Michael Heerdegen, 2013/04/03