all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: R.Ekker@ai.rug.nl
Cc: bug-gnu-emacs@gnu.org
Subject: Re: highlight-changes-rotate-faces sets buffer modified flag
Date: Tue, 08 May 2007 08:10:45 +0200	[thread overview]
Message-ID: <46401465.4050803@gmx.at> (raw)

 > Running the function highlight-changes-rotate-faces sets the buffer's
 > modified flag. It seems to me that this should not happen, since only
 > some faces are changed.

Thank you for sending a report on this.  In principle a "face change"
may change the buffer-modified state and can be undone as well.  In the
present case I agree with you that the buffer-modified state should not
change.  I believe that most of theses face changes were obscured by
changes in the buffer text, hence probably people didn't notice.

 > As a workaround, I use the following advice:
 >
 >
 > ;; advice for highlight-changes-rotate-faces
 > ;; so that it does not change the modified flag for the buffer
 > (defadvice highlight-changes-rotate-faces (around around-rotate-faces)
 >   (let ((was-modified (buffer-modified-p)))
 >         ad-do-it
 >         (unless was-modified
 >           (set-buffer-modified-p nil))))
 > (ad-activate 'highlight-changes-rotate-faces)

You proably do not want adding an entry to `buffer-undo-list' either.

 >
 >
 > The version string of my emacs:
 > "GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600) of 2004-03-10 on NYAUMO"

AFAICT this problem is still present in Emacs 22.  In addition, it seems
to me that turning off `highlight-changes-mode' may set the
buffer-modified state as well.  Could you please verify this on your
system?

             reply	other threads:[~2007-05-08  6:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08  6:10 martin rudalics [this message]
2007-05-09  9:29 ` highlight-changes-rotate-faces sets buffer modified flag Reindert-Jan Ekker
2007-05-09 12:24   ` martin rudalics
2007-05-09 13:41     ` Reindert-Jan Ekker
2007-05-09 16:53       ` martin rudalics
  -- strict thread matches above, loose matches on Subject: below --
2007-05-07 15:30 Reindert-Jan Ekker

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

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

  git send-email \
    --in-reply-to=46401465.4050803@gmx.at \
    --to=rudalics@gmx.at \
    --cc=R.Ekker@ai.rug.nl \
    --cc=bug-gnu-emacs@gnu.org \
    /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.
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.