unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: An idea: combine-change-calls
Date: Tue, 27 Mar 2018 16:58:16 +0000	[thread overview]
Message-ID: <20180327165816.GB4105@ACM> (raw)
In-Reply-To: <jwvzi2ud042.fsf-monnier+gmane.emacs.devel@gnu.org>

Hello, Stefan.

On Mon, Mar 26, 2018 at 17:07:40 -0400, Stefan Monnier wrote:
> > I'm experimenting with a different strategy: surrounding the mass of
> > elements in buffer-undo-list with a `(combine-change-begin ,beg ,end)
> > and a `(combine-change-end ,beg ,end).

> Beware: this changes the format of entries that can appear in the
> buffer-undo-list, which has repercussions beyond primitive-undo, IOW it
> can/will break other things such as undo-in-region and undo-tree.

Thanks.  I didn't know about undo-in-region.  That is a peculiarly badly
documented feature: Neither manual states what it means for an
undo-entry to be "within the region", and nowhere is it stated what
happens to undo-entries which aren't in the region.  Maybe they are
just discarded, maybe they are somehow kept in the undo list.

It looks like I've got some source code to read.

By the way, what's undo-tree?  I've not been able to find that symbol at
all in the source code.

> Better use the (apply DELTA BEG END FUN-NAME . ARGS) form, which was
> introduced specifically for use of such extensions.

This won't work, at least not without some seriously twisted coding: The
essential thing about (combine-change-end/begin ..) is that they bind
inhibit-modification-hooks to non-nil for other entries in the
undo-list.  Maybe FUN-NAME could call primitive-undo, but this doesn't
seem wise.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



  reply	other threads:[~2018-03-27 16:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-24 13:50 An idea: combine-change-calls Alan Mackenzie
2018-03-24 22:18 ` Stefan Monnier
2018-03-25 19:14   ` Alan Mackenzie
2018-03-25 20:05     ` Stefan Monnier
2018-03-26 20:17       ` Alan Mackenzie
2018-03-26 21:07         ` Stefan Monnier
2018-03-27 16:58           ` Alan Mackenzie [this message]
2018-03-27 18:30             ` Stefan Monnier
2018-03-27 19:45               ` Alan Mackenzie
2018-03-27 20:24                 ` Stefan Monnier
2018-03-28 20:42                   ` Alan Mackenzie
2018-03-28 21:26                     ` Stefan Monnier
2018-03-29 15:10                       ` Alan Mackenzie
2018-03-29 15:40                         ` Stefan Monnier
2018-03-29 17:11                           ` Alan Mackenzie
2018-03-29 19:10                             ` Stefan Monnier
2018-03-30 11:46                               ` Alan Mackenzie
2018-03-30 15:05                                 ` Stefan Monnier
2018-03-31 21:00                                   ` Alan Mackenzie
2018-03-31 23:38                                     ` Stefan Monnier
2018-04-01 14:24                                       ` Alan Mackenzie
2018-04-01 19:22                                         ` Stefan Monnier
2018-03-30  9:12           ` Johan Bockgård
2018-03-30 13:04             ` Stefan Monnier
2018-04-02 16:25               ` Alan Mackenzie
2018-04-02 17:52                 ` Johan Bockgård
2018-04-03  0:41                 ` Stefan Monnier
2018-04-03  1:43                 ` Clément Pit-Claudel
2018-04-03  3:15                 ` Richard Stallman
2018-03-26 21:09         ` Stefan Monnier
2018-03-27  0:36         ` Stefan Monnier
2018-03-27 17:00           ` Alan Mackenzie

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=20180327165816.GB4105@ACM \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).