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

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

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


From: Hongyi Zhao
Subject: Re: append, push, and add-to-list.
Date: Mon, 5 Jul 2021 14:19:41 +0800

On Mon, Jul 5, 2021 at 1:51 PM Emanuel Berg via Users list for the GNU
Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> 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)
>

Yes. Thanks again.

> > 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'

I tried with `eval-buffer' but can't see the expected output.

> 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...
>

HY
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China



reply via email to

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