[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: highlight-changes-remove
From: |
Daniel Wright |
Subject: |
Re: highlight-changes-remove |
Date: |
Tue, 26 Apr 2005 20:09:24 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"Misto ." <mistobaan@gmail.com> writes:
> I use the highlight mode when editing my files.
> I would like to bind the function highlight-changes-remove-highlight
> when I save the
> file. First is needed to select all the buffer and next invoke that function.
>
> How I can do that?
Hi!
I hope this is what you'd like have in your .emacs:
(add-hook 'after-save-hook
'(lambda()
(if (boundp 'highlight-changes-mode)
(highlight-changes-remove-highlight (point-min) (point-max)))))
You can often find a hook to add behaviour like this (in this case
after-save-hook), and then add the function you need to it. Calling the
function highlight-changes-remove-highlight with the arguments above
means that it operates on the whole buffer - you don't need to select
the whole buffer first.
You can get help for the function to see which arguments it takes,
etc. with:
C-h f highlight-changes-remove-highlight RET
Graciously,
Daniel.