Seems legit. But then how do users typically install it? It's not like other minor modes which are part of a hook. Do they just do "auto-dim-other-buffers-mode" and it's enabled globally until they disable it the same way or quit emacs? Funny, melpa *just* updated it a few minutes ago, and it's already about to be woefully out of date again. At least the version in melpa right now is much more efficient than the last one. -Steven On Wed, Apr 3, 2013 at 1:10 PM, Óscar Fuentes wrote: > Steven Degutis 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. >