[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
;;; blinkline.el --- blink a line and keep the line highlighted
From: |
Kevin A. Burton (burtonator) |
Subject: |
;;; blinkline.el --- blink a line and keep the line highlighted |
Date: |
17 Dec 2002 00:15:15 -0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2.90 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
;;; blinkline.el --- blink a line and keep the line highlighted
;; $Id: blinkline.el,v 1.1 2002/12/16 03:49:08 burton Exp $
;; Copyright (C) 2000-2003 Free Software Foundation, Inc.
;; Copyright (C) 2000-2003 Kevin A. Burton (address@hidden)
;; Author: Kevin A. Burton (address@hidden)
;; Maintainer: Kevin A. Burton (address@hidden)
;; Location: http://relativity.yi.org
;; Keywords:
;; Version: 1.0.0
;; This file is [not yet] part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify it under
;; the terms of the GNU General Public License as published by the Free Software
;; Foundation; either version 2 of the License, or any later version.
;;
;; This program is distributed in the hope that it will be useful, but WITHOUT
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
;; details.
;;
;; You should have received a copy of the GNU General Public License along with
;; this program; if not, write to the Free Software Foundation, Inc., 59 Temple
;; Place - Suite 330, Boston, MA 02111-1307, USA.
;;; Commentary:
;; Provides a mechanism for blinking the current line within Emacs
;; NOTE: If you enjoy this software, please consider a donation to the EFF
;; (http://www.eff.org)
;;; Code:
(defface blinkline-face '((t (:background "DarkBlue")))
"Face used for the last available match when a face isn't specified."
:group 'blinkline)
(defvar blinkline--overlay nil "Overlay used for blinking lines.")
(defun blinkline(&optional face)
"Blink the current line and deactivate the blink when anything happens within
Emacs."
(interactive)
(let((overlay (make-overlay (point-at-bol) (1+ (point-at-eol))
(current-buffer))))
(when (null face)
(setq face 'blinkline-face))
(overlay-put overlay 'face face)
(overlay-put overlay 'priority 1)
(setq blinkline--overlay overlay)
;;delete this overlay...
(add-hook 'pre-command-hook 'blinkline-unblink)))
(defun blinkline-unblink()
(delete-overlay blinkline--overlay)
(setq blinkline--overlay nil)
(remove-hook 'pre-command-hook 'blinkline-unblink))
(provide 'blinkline)
;;; blinkline.el ends here
- --
Kevin A. Burton ( address@hidden, address@hidden, address@hidden )
Location - San Francisco, CA, Cell - 415.595.9965
Jabber - address@hidden, Web - http://www.peerfear.org/
GPG fingerprint: 4D20 40A0 C734 307E C7B4 DCAA 0303 3AC5 BD9D 7C4D
IRC - openprojects.net #infoanarchy | #p2p-hackers | #reptile
Windows is easy to learn and hard to use, while *nix is hard to learn but easy
to use.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt
iD8DBQE9/t0TAwM6xb2dfE0RAnisAJ9uUdNw0q4L1vmYfKp3D4Zad0WkpwCgnMLL
5Q5B6yqLQeY9FcCHkDRZl6M=
=7FGm
-----END PGP SIGNATURE-----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ;;; blinkline.el --- blink a line and keep the line highlighted,
Kevin A. Burton (burtonator) <=