[Top][All Lists]

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

Window-blinker (light) I need advices!

From: François Fleuret
Subject: Window-blinker (light) I need advices!
Date: 20 Nov 2003 01:00:02 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50


The e-other-window thing is a neat stuff. I wrote my own simpler
version (which is not full-featured, but small is beautiful).

Two questions:

 - Is my defadvice usage correct ? It looks sort of odd to me
   (especially to have to define one symbol for each advice ?)

 - Is there a better way to change a window background color ? This
   overlay trick stuff just sucks. First, it wont blink the empty
   lines (which is very bad for an empty buffer ...) and if several
   window display areas overlap, they will all blinks !



(make-face 'blinker-face)
(set-face-attribute 'blinker-face nil  :background "white")

(defun blinker-blink-current() (interactive)
  (make-local-variable 'blinker-overlay)
  (setq blinker-overlay (make-overlay (window-start) (window-end)))
  (overlay-put blinker-overlay 'face 'blinker-face)
  (sit-for 0 50)
  (delete-overlay blinker-overlay))

(defadvice switch-to-buffer-other-window (after 
blinker-switch-to-buffer-other-window nil activate)

(defadvice next-multiframe-window (after blinker-next-multiframe-window nil 

(defadvice previous-multiframe-window (after blinker-previous-multiframe-window 
nil activate)

(defadvice other-window (after blinker-other-window nil activate)

reply via email to

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