emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keeping replace-buffer-contents runtime in bounds


From: Tassilo Horn
Subject: Re: Keeping replace-buffer-contents runtime in bounds
Date: Sun, 17 Feb 2019 19:26:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> If that number of seconds is over, compareseq returns early and
>> replace-buffer-contents falls back to plain delete and insert.
>
> The gotcha about aborting after more than the time-out value should be
> mentioned in the doc string.

Right, I will do that including a NEWS entry and an update of the Info
docs.

> Thanks for working on this.  My only other comment is that maybe we
> should allow passing the time-out value via the function's arguments,
> not via a global variable.  It seems to me the time-out will be used
> in more use cases than MAX-COSTS, and in any case treating these two
> differently API-wise sounds strangely inconsistent.

I'll do that.  So two optional args and MAX-SECS as the first one,
right?

>> This is my first C encounter in emacs, so please feel free to
>> nit-pick.
>
> Nitpicking:
>
>> +  DEFVAR_LISP ("replace-buffer-contents-max-secs",
>> +           Vreplace_buffer_contents_max_secs,
>> +           doc: /* If differencing the two buffers takes longer than this,
>> +`replace-buffer-contents' falls back to a plain delete and insert.  */);
>
> The first sentence of a doc string should not be longer than 79
> characters.  (But if you agree with me, this variable will go away, so
> it's a moot point.)

Yup.

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]