[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Non-matching string failing alist search
From: |
Drew Adams |
Subject: |
RE: [External] : Non-matching string failing alist search |
Date: |
Mon, 22 Aug 2022 14:26:28 +0000 |
> What can I do in the case that the string passed
> to word does not exist in `alist-t1'?
>
> (add-to-list
> 'nscrip
> (replace-regexp-in-string
> word (cdr (assoc word alist-t1)) word))
Do nothing? (Depends what _you_ want to do.)
(let ((x (assoc word alist-t1)))
(when x
(add-to-list
'nscrip
(replace-regexp-in-string word (cdr x) word))))