all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "François Fleuret" <francois.fleuret@inria.fr>
Subject: Window-blinker (light) I need advices!
Date: 20 Nov 2003 01:00:02 +0100	[thread overview]
Message-ID: <s0265hfhptp.fsf@wasabi.inria.fr> (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))

             reply	other threads:[~2003-11-20  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-20  0:00 François Fleuret [this message]
2003-11-20  0:36 ` Window-blinker (light) I need advices! Kevin Rodgers
2003-11-20  0:39 ` Kevin Rodgers
2003-11-20  9:33   ` François Fleuret

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s0265hfhptp.fsf@wasabi.inria.fr \
    --to=francois.fleuret@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.