[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Copying a list for insertion
From: |
Heime |
Subject: |
Re: Copying a list for insertion |
Date: |
Sat, 22 Oct 2022 06:52:02 +0000 |
------- Original Message -------
On Saturday, October 22nd, 2022 at 6:43 AM, Jean Louis <bugs@gnu.support> wrote:
> * Heime heimeborgia@protonmail.com [2022-10-22 04:03]:
>
> > > * Heime heimeborgia@protonmail.com [2022-10-22 02:06]:
> > >
> > > > Any reason why you use "progn" in the "stringp" condition?
> > >
> > > (defun rcd-kill-new (kill)
> > > (cond ((stringp kill) (progn
> > > (kill-new kill)
> > > (rcd-message "Killed: %s" kill)))
> > > (t (rcd-message "😧 WARNING: Nothing to kill."))))
> > >
> > > I use it to enclose two functions in one body of functions as `cond'
> > > does not allow me to use 2 functions for one condition without
> > > enclosing.
> >
> > "cond" allows multiple body-forms in one clause. Thusly no need for "progn".
>
>
> Show me how please. I do not understand it.
(defun rcd-kill-new (kill)
(cond ((stringp kill)
(kill-new kill)
(rcd-message "Killed: %s" kill))
(t (rcd-message "😧 WARNING: Nothing to kill."))))
- Re: Copying a list for insertion, (continued)
- Re: Copying a list for insertion, Teemu Likonen, 2022/10/21
- Re: Copying a list for insertion, Jean Louis, 2022/10/21
- Re: Copying a list for insertion, Heime, 2022/10/21
- Re: Copying a list for insertion, Heime, 2022/10/21
- Re: Copying a list for insertion, Heime, 2022/10/21
- Re: Copying a list for insertion, Jean Louis, 2022/10/21
- Re: Copying a list for insertion, Heime, 2022/10/21
- Re: Copying a list for insertion, Jean Louis, 2022/10/22
- Re: Copying a list for insertion,
Heime <=
- Re: Copying a list for insertion, Jean Louis, 2022/10/22
- Re: Copying a list for insertion, tomas, 2022/10/22
- Re: Copying a list for insertion, Emanuel Berg, 2022/10/22
- Re: Copying a list for insertion, Emanuel Berg, 2022/10/22
- Re: Copying a list for insertion, Jean Louis, 2022/10/22
- Re: Copying a list for insertion, Emanuel Berg, 2022/10/25
- Re: Copying a list for insertion, Emanuel Berg, 2022/10/22
- Re: Copying a list for insertion, Jean Louis, 2022/10/22
- Re: Copying a list for insertion, Emanuel Berg, 2022/10/25
- Re: Copying a list for insertion, Jean Louis, 2022/10/21