From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Skilbeck Newsgroups: gmane.emacs.help Subject: Re: `auto-dim-other-windows` -- scrutiny invited Date: Wed, 3 Apr 2013 15:47:05 +0100 Message-ID: <20130403144705.GA2375@earth> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1365000467 16096 80.91.229.3 (3 Apr 2013 14:47:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Apr 2013 14:47:47 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Steven Degutis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 03 16:48:10 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UNOyu-0002Cx-HP for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Apr 2013 16:48:08 +0200 Original-Received: from localhost ([::1]:42320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNOyV-0003lH-SJ for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Apr 2013 10:47:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNOy1-0003OF-GF for help-gnu-emacs@gnu.org; Wed, 03 Apr 2013 10:47:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNOxv-0004bz-QU for help-gnu-emacs@gnu.org; Wed, 03 Apr 2013 10:47:13 -0400 Original-Received: from li357-97.members.linode.com ([178.79.188.97]:45260 helo=mail.iammark.us) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNOxv-0004be-LM for help-gnu-emacs@gnu.org; Wed, 03 Apr 2013 10:47:07 -0400 Original-Received: from mail.iammark.us (host86-156-209-251.range86-156.btcentralplus.com [86.156.209.251]) by mail.iammark.us (Postfix) with ESMTPSA id F2F61AF01; Wed, 3 Apr 2013 15:47:05 +0100 (BST) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 178.79.188.97 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89935 Archived-At: On Wed, Apr 03, 2013 at 09:44:07AM -0500, Steven Degutis wrote: > It's now called `auto-dim-other-buffers` and it just got a whole lot more > efficient and faster: https://github.com/sdegutis/auto-dim-other-buffers.el > > There's one bug left that I don't know how to fix: for some reason, > anything echoed in the echo area is dimmed. Not really sure why or even how. > > Why didn't anything like this exist all this time? I've checked > stackoverflow for something like this months ago and the "chosen answer" > was to just use a more distinct modeline. But this is much better. You're a real hero. > > -Steven > > > On Tue, Apr 2, 2013 at 4:06 PM, Steven Degutis wrote: > > > (defun auto-dim-other-windows () > > (make-face 'sd/dimmed-font) > > (set-face-attribute 'sd/dimmed-font nil :background "black") > > > > (defun sd/prominantize-current-buffer (fn) > > (buffer-face-set 'sd/dimmed-font) > > (funcall fn) > > (buffer-face-set nil)) > > > > (defmacro sd/advise-window-changing-fn (fn) > > `(defadvice ,fn (around window-changing-fn-advice activate) > > (sd/prominantize-current-buffer (lambda () ad-do-it)))) > > > > (sd/advise-window-changing-fn other-window) > > (sd/advise-window-changing-fn other-frame) > > (sd/advise-window-changing-fn next-buffer) > > (sd/advise-window-changing-fn previous-buffer) > > (sd/advise-window-changing-fn quit-window) > > (sd/advise-window-changing-fn mouse-select-window)) > > > > -Steven > >