|
From: | Steven Degutis |
Subject: | Re: `auto-dim-other-windows` -- scrutiny invited |
Date: | Wed, 3 Apr 2013 13:54:36 -0500 |
Steven Degutis <sbdegutis@gmail.com> writes:From the POV of the user a minor mode is an standard interface for
> 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?
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.
[Prev in Thread] | Current Thread | [Next in Thread] |