[Top][All Lists]

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

Re: 31395511: "Don’t attempt to modify constant strings"

From: João Távora
Subject: Re: 31395511: "Don’t attempt to modify constant strings"
Date: Thu, 04 Jun 2020 10:31:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Pip Cet <pipcet@gmail.com> writes:

> On Wed, Jun 3, 2020 at 11:48 PM João Távora <joaotavora@gmail.com> wrote:
>> On Wed, Jun 3, 2020 at 11:42 PM Pip Cet <pipcet@gmail.com> wrote:
>> By itself, that doesn't work.  I have the same problem.
> Strange, I'd tried it locally and it appeared to work.

Yep, I didn't dig in, but it seems now that some buttons works and
other's don't  work.  So in a REPL typing "123"

  CL-USER> 123
  123 (7 bits, #x7b, #o173, #b1111011)

doesn't work (the second line should be interactive and it's not). But
now I did dig in and that's because other code is using the same
paradigm that sly-make-action-button was using.  Everything should work
if I track such users and change them.

I think I will lose compatibility to ~24.4, which is where I developed
this code.  Oh well.

>> I think I'd rather this previous behavior were retained, or at least
>> achievable by request. I haven't touched this code in a long
>> I don't know what else might depend on it.
> But the previous behavior was buggy. Things like
> (defun sly-inspector-insert-more-button (index previous)
>   (insert (sly-make-action-button
>            (if previous " [--more--]\n" " [--more--]")
>            #'sly-inspector-fetch-more
>            'range-args (list index previous))))
> worked only by accident, before.
Accident/spec/divine providence: they worked, and for a long time.
make-text-button never warned me about mutability/immutability, constant
strings or non-constant strings.  So effectively we're changing the sepc
implicit or explicit, in a backwards-incompatible way, and that breaks
programs, case in point.


PS: I admit I didn't check the recent "incompatible lisp changes" NEWS
for recent Emacs versions, maybe there's something in there that could
have given me a heads up.

reply via email to

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