[Top][All Lists]

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

Re: append, push, and add-to-list.

From: Emanuel Berg
Subject: Re: append, push, and add-to-list.
Date: Mon, 05 Jul 2021 07:50:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hongyi Zhao wrote:

>> (setq lst '(a b))
>> (setq lst `(,@lst logic) ; (a b logic)
> You have a typo here, should be the following:
> ((setq lst `(,@lst logic))

Heh, yes but now there is another typo :)

It should look like this:

  (setq lst '(a b))
  (setq lst `(,@lst logic)) ; (a b logic)

> Wonderful examples, but how to eval multiple line lisp codes
> in scratch buffer? I only know with twice hitting of `C-j'
> for this job, as shown below:

You can use `eval-buffer' or enclose it in a `progn' perhaps.
Or, for this particular example, `let'/`let*'...

I have M-9 do `eval-last-sexp', more ergonomic IMO than
whatever is the default binding...

underground experts united

reply via email to

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