help-gnu-emacs
[Top][All Lists]
Advanced

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

`auto-dim-other-windows` -- scrutiny invited


From: Steven Degutis
Subject: `auto-dim-other-windows` -- scrutiny invited
Date: Tue, 2 Apr 2013 16:06:17 -0500

    (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

reply via email to

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