unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Daniel Wright <daniel.d.wright@gmail.com>
Subject: Re: highlight-changes-remove
Date: Tue, 26 Apr 2005 20:09:24 +0200	[thread overview]
Message-ID: <m3zmvl1kbv.fsf@labrelruso.bighost> (raw)
In-Reply-To: e437f2f05042603267682468f@mail.gmail.com

"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.

      reply	other threads:[~2005-04-26 18:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-26 10:26 highlight-changes-remove Misto .
2005-04-26 18:09 ` Daniel Wright [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m3zmvl1kbv.fsf@labrelruso.bighost \
    --to=daniel.d.wright@gmail.com \
    /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.
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).