* highlight-changes-remove
@ 2005-04-26 10:26 Misto .
2005-04-26 18:09 ` highlight-changes-remove Daniel Wright
0 siblings, 1 reply; 2+ messages in thread
From: Misto . @ 2005-04-26 10:26 UTC (permalink / raw)
Hi to all!
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?
Thanks for your time!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: highlight-changes-remove
2005-04-26 10:26 highlight-changes-remove Misto .
@ 2005-04-26 18:09 ` Daniel Wright
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Wright @ 2005-04-26 18:09 UTC (permalink / raw)
"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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-26 18:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-26 10:26 highlight-changes-remove Misto .
2005-04-26 18:09 ` highlight-changes-remove Daniel Wright
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).