unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Window-blinker (light) I need advices!
@ 2003-11-20  0:00 François Fleuret
  2003-11-20  0:36 ` Kevin Rodgers
  2003-11-20  0:39 ` Kevin Rodgers
  0 siblings, 2 replies; 4+ messages in thread
From: François Fleuret @ 2003-11-20  0:00 UTC (permalink / raw)


Hi,

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 !

Regards,

F.

(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)
  (blinker-blink-current))

(defadvice next-multiframe-window (after blinker-next-multiframe-window nil activate)
  (blinker-blink-current))

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-11-20  9:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-20  0:00 Window-blinker (light) I need advices! François Fleuret
2003-11-20  0:36 ` Kevin Rodgers
2003-11-20  0:39 ` Kevin Rodgers
2003-11-20  9:33   ` François Fleuret

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).