unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Juanma Barranquero <lekktu@gmail.com>,
	Richard Sharman <rsharman@pobox.com>,
	Emacs Devel <emacs-devel@gnu.org>
Subject: Re: buffer is modified after commit
Date: Thu, 14 Feb 2008 23:46:19 +0100	[thread overview]
Message-ID: <47B4C4BB.1080008@gmx.at> (raw)
In-Reply-To: <jwvtzkboaq7.fsf-monnier+emacs@gnu.org>

 >    (push
 >     (let* ((buffer-undo-list nil))
 >       ...do your thing...
 >       `(apply 'hilit-chg-undo-nomodify ,buffer-undo-list))
 >     buffer-undo-list)

It would be very, very helpful if you turned this into a macro.  IMHO
subr.el should provide two macros: A standard one allowing to change
text properties on-the-fly and this one to additionally specify undo
information.  If you look at the current emacs sources you can find at
least ten ways how people decided to change text properties on-the-fly
and some of these might have to be undoable as well.  I also wonder how
often people have used overlays only to escape the problem of handling
the modified state of buffers (in one case the author apparently saved
the state even around an overlay modification).





      reply	other threads:[~2008-02-14 22:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 16:31 buffer is modified after commit Juanma Barranquero
2008-02-13 16:04 ` Juanma Barranquero
2008-02-13 18:45   ` martin rudalics
2008-02-13 19:50   ` Stefan Monnier
2008-02-13 21:39     ` martin rudalics
2008-02-13 22:01       ` Stefan Monnier
2008-02-14  1:56         ` Juanma Barranquero
2008-02-14  7:53         ` martin rudalics
2008-02-14 14:57           ` Stefan Monnier
2008-02-14 22:46             ` martin rudalics [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=47B4C4BB.1080008@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=rsharman@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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