unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Yuan Fu <casouri@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Distinguish between regional undo and undo to the beginning in undo-equiv-table
Date: Fri, 05 Mar 2021 10:57:16 -0500	[thread overview]
Message-ID: <jwv7dmlfvfc.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <06A32454-8DB2-492C-9A69-A825AD5B66A2@gmail.com> (Yuan Fu's message of "Thu, 4 Mar 2021 11:18:30 -0500")

>>> Then should we add a mapping for the buffer-undo-list to t at that
>>> point?  Or should we just do nothing?
>> Good question.  I think you have a better understanding of how the equiv
>> table should be filled than I do at this point, so I'd trust your judgment.
> Ok, I looked into it in detail, undo-equiv-table is also used to check if
> the previous command is really an undo, alongside with checking
> last-command.

Indeed [ tho, this test is not 100% reliable, because the hash-table is
weak, so entries may disappear from it, leading to entries that used to
map to non-nil suddenly mapping to nil.  ]

> So the undo record has to map to something, I decide to map it to
> ‘empty unless there is already a mapping for the record.  Here is the
> (standalone) final draft. Please have a look.

Looks good, thanks.


        Stefan




  reply	other threads:[~2021-03-05 15:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 20:40 Distinguish between regional undo and undo to the beginning in undo-equiv-table Yuan Fu
2021-03-02 23:50 ` Stefan Monnier
2021-03-03 15:42   ` Yuan Fu
2021-03-03 16:50     ` Stefan Monnier
2021-03-03 20:33       ` Yuan Fu
2021-03-03 21:29         ` Stefan Monnier
2021-03-03 21:59           ` Yuan Fu
2021-03-03 22:08             ` Yuan Fu
2021-03-03 22:28             ` Stefan Monnier
2021-03-04 16:18               ` Yuan Fu
2021-03-05 15:57                 ` Stefan Monnier [this message]
2021-03-06 17:28                   ` Yuan Fu
2021-03-06 18:40                     ` Stefan Monnier
2021-03-11 17:50                       ` Yuan Fu
2021-03-11 17:54                         ` Stefan Monnier
2021-03-11 21:23                           ` Yuan Fu
2021-03-11 22:41                 ` Stefan Monnier

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=jwv7dmlfvfc.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=casouri@gmail.com \
    --cc=emacs-devel@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 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).