From: Drew Adams <drew.adams@oracle.com>
To: uzibalqa <uzibalqa@proton.me>,
uzibalqa via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: RE: [External] : Non-matching string failing alist search
Date: Mon, 22 Aug 2022 14:26:28 +0000 [thread overview]
Message-ID: <SJ0PR10MB54881F824FA6F8E87AE671E5F3719@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <v-nZ12wFUJ-p-rgQJaDfqCliSKVHv4nvuiI-S2uBpW-ZGFuPZCK5Srdck10pCdviRiutjs7fmbRICdsY9f1TLN40SKbihk1BvaQ2Ap9epwI=@proton.me>
> 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))))
prev parent reply other threads:[~2022-08-22 14:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-21 23:38 Non-matching string failing alist search uzibalqa
2022-08-22 14:26 ` Drew Adams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR10MB54881F824FA6F8E87AE671E5F3719@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=uzibalqa@proton.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).