[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Copying a list for insertion
From: |
Emanuel Berg |
Subject: |
Re: Copying a list for insertion |
Date: |
Sat, 22 Oct 2022 02:48:49 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Jean Louis wrote:
>> 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.
(if (not (stringp str)) ... )
You can also do
(let ((str (format "%s" data))) ...)
But as you know there is already `kill-new' ... `advice-add',
maybe that happens all the time tho so you don't want that?
I guess you'll find out. There is `advice-remove'.
--
underground experts united
https://dataswamp.org/~incal
- Re: Copying a list for insertion, (continued)
- 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, 2022/10/22
- 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 <=
- 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