From: Stefan Monnier <monnier@iro.umontreal.ca>
To: phillip.lord@russet.org.uk (Phillip Lord)
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: undo refactoring
Date: Tue, 05 Jul 2016 17:50:28 -0400 [thread overview]
Message-ID: <jwvwpkz69r4.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8760skcw09.fsf_-_@russet.org.uk> (Phillip Lord's message of "Tue, 05 Jul 2016 09:46:46 +0100")
> Why not just do
> bset_undo_list (current_buffer,
> Fcons (Qnil, BVAR (current_buffer, undo_list)));
> and remove all references to pending_boundary (and therefore
> `prepare_record` which is now rather badly named)? Or am I missing
> something
IIUC, the reason for this was so as to avoid an inf-loop when malloc
fails (for lack of memory).
The particular issue was that it was OK for a command to fail because of
malloc failure, but it was not OK for the read-eval-loop itself to fail
before having the opportunity to run another command.
My impression is that this design goal has been ignored for much too
long, so I don't think Emacs behaves this way any more. And instead we
have now other ways to handle the memory-full situation (such as the
extra memory that's pre-allocated and then released in case the memory
is full).
IOW, I'd be surprised if getting rid of this quirk would ever lead to
a visible change in Emacs's behavior nowadays.
Stefan
next prev parent reply other threads:[~2016-07-05 21:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m2mvm3fz14.fsf@metalevel.at>
[not found] ` <83h9cavdgj.fsf@gnu.org>
[not found] ` <87poqyy2tc.fsf@metalevel.at>
[not found] ` <87vb0qqrkz.fsf@russet.org.uk>
[not found] ` <87h9c9zx75.fsf@metalevel.at>
[not found] ` <834m89vmyv.fsf@gnu.org>
[not found] ` <878txlsbdb.fsf@russet.org.uk>
[not found] ` <87furtccdv.fsf@metalevel.at>
[not found] ` <877fd5q9te.fsf@russet.org.uk>
[not found] ` <83bn2gtruk.fsf@gnu.org>
[not found] ` <87k2h37pvb.fsf@russet.org.uk>
[not found] ` <jwv37nqa0dc.fsf-monnier+bug#23871@gnu.org>
[not found] ` <87vb0lta67.fsf@russet.org.uk>
[not found] ` <jwv60sl85nl.fsf-monnier+Inbox@gnu.org>
2016-07-05 8:46 ` undo refactoring Phillip Lord
2016-07-05 21:50 ` Stefan Monnier [this message]
2016-07-05 22:22 ` Phillip Lord
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=jwvwpkz69r4.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=phillip.lord@russet.org.uk \
/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).