all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* editing buffer -> call function
@ 2009-05-18 15:30 Sebastien LE MAGUER
  2009-05-18 19:24 ` Nikolaj Schumacher
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastien LE MAGUER @ 2009-05-18 15:30 UTC (permalink / raw)
  To: emacs help

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

Hi everyone,

I wonder how to call a function everytime a buffer is updated. For example :
 - I want to highlight each instance a specific word
 - Every time I write this word after the search, I want to highlight it 
automatically or if I delete an instance of it clear the overlay.

Can you help me ?

Thx

Sebastien

[-- Attachment #2: Sebastien_Le_maguer.vcf --]
[-- Type: text/x-vcard, Size: 364 bytes --]

begin:vcard
fn;quoted-printable:S=C3=A9bastien Le Maguer
n;quoted-printable:Le Maguer;S=C3=A9bastien
org:;Equipe CORDIAL
adr:ENSSAT - 6 rue de Kerampont, BP 80518 ;;Bureau 203-I;Lannion Cedex;;22305 ;France
email;internet:Sebastien.Le_Maguer@irisa.fr
title:Doctorant
tel;work:02 96 46 91 29
url:http://www.irisa.fr/cordial/Members/slemague/
version:2.1
end:vcard


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

* Re: editing buffer -> call function
  2009-05-18 15:30 editing buffer -> call function Sebastien LE MAGUER
@ 2009-05-18 19:24 ` Nikolaj Schumacher
  0 siblings, 0 replies; 2+ messages in thread
From: Nikolaj Schumacher @ 2009-05-18 19:24 UTC (permalink / raw)
  To: Sebastien LE MAGUER; +Cc: emacs help

Sebastien LE MAGUER <Sebastien.Le_maguer@irisa.fr> wrote:

> I wonder how to call a function everytime a buffer is updated. For example :
> - I want to highlight each instance a specific word
> - Every time I write this word after the search, I want to highlight it
> automatically or if I delete an instance of it clear the overlay.
>
> Can you help me ?

Use the hook `after-change-functions'.

Or you can leave the work to `highlight-regexp'.  Look at
highlight-symbol.el[1] for an example.


regards,
Nikolaj Schumacher

[1]: http://nschum.de/src/emacs/highlight-symbol/




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

end of thread, other threads:[~2009-05-18 19:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-18 15:30 editing buffer -> call function Sebastien LE MAGUER
2009-05-18 19:24 ` Nikolaj Schumacher

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.