From: "Charl P. Botha" <cpbotha@vxlabs.com>
To: "Yuan Fu" <casouri@gmail.com>
Cc: 59945@debbugs.gnu.org
Subject: bug#59945: [PATCH] Fix empty pairs in js tree-sitter imenu alist
Date: Wed, 21 Dec 2022 12:15:47 +0200 [thread overview]
Message-ID: <f36c3414-f6b7-4f2a-a4fe-3babfcf8e55d@app.fastmail.com> (raw)
In-Reply-To: <7B3A9410-A4E4-4B32-83CE-FADB9588C7A7@gmail.com>
Dear Yuan,
On Wed, Dec 21, 2022, at 06:48, Yuan Fu wrote:
> Thanks! I applied your patch. I made a little change to it so it’s more
> idiomatic.
>
> Elisp tip of the day: if you want to make a list of possibly nil objects
> and don’t want nil’s in the list, you can use append. Basically change
>
> (list a b c)
>
> to
>
> (append (and xxx (list a)) (and yyy (list b)) (and zzz (list c)))
>
> If the condition aren’t met, eg, (and xxx (list a)) returns nil, append
> just appends an empty list.
Thank you very much for taking care of this, and thank you for your emacs-lisp improvement and tip. On that day, I searched for but was not able to find a better formulation than my klunky one.
Kind regards,
Charl
next prev parent reply other threads:[~2022-12-21 10:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-10 17:17 bug#59945: [PATCH] Fix empty pairs in js tree-sitter imenu alist Charl P. Botha
2022-12-12 22:28 ` Yuan Fu
2022-12-13 7:48 ` Charl P. Botha
2022-12-13 12:40 ` Eli Zaretskii
2022-12-13 12:03 ` Eli Zaretskii
2022-12-15 9:13 ` Charl P. Botha
2022-12-15 10:41 ` Eli Zaretskii
2022-12-16 1:40 ` Yuan Fu
2022-12-16 5:58 ` Charl P. Botha
2022-12-16 14:11 ` Robert Pluim
2022-12-16 17:52 ` Charl P. Botha
2022-12-21 4:48 ` Yuan Fu
2022-12-21 10:15 ` Charl P. Botha [this message]
2022-12-21 17:25 ` Robert Pluim
2022-12-22 8:10 ` Yuan Fu
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f36c3414-f6b7-4f2a-a4fe-3babfcf8e55d@app.fastmail.com \
--to=cpbotha@vxlabs.com \
--cc=59945@debbugs.gnu.org \
--cc=casouri@gmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.