"Misto ." <[EMAIL PROTECTED]> 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.



_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to