help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: problems with Emacs 28


From: Michael Heerdegen
Subject: Re: problems with Emacs 28
Date: Sat, 24 Oct 2020 11:46:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> The byte-compiler, and the docstring, tells me I should use `map-put!'
> as `map-put' is decrepated. However when I do that, I get a
> "map-not-inplace" error.

Yes, the replacement is not totally equivalent to the deprecated
function (if it would be, it would not make sense to introduce a
replacement at all).

If you read the docstring of `map-put!' you'll see why you get the
error.

You will probably rather want to use `setf' with an `alist-get' place
expression.  Yes, the recommendation was not a good one in your case.

> What is that bang (explication mark) syntax BTW?

That comes from the scheme tradition: it is used for functions that
modify something (state), unlike "pure" functions that "only" calculate
a return value.  E.g. `+', `car' vs. `setcar!' etc., you get it.

Regards,

Michael.




reply via email to

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