all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: luangruo@yahoo.com, emacs-devel@gnu.org
Subject: Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions
Date: Sun, 16 Apr 2023 09:37:04 +0300	[thread overview]
Message-ID: <83leisbaen.fsf@gnu.org> (raw)
In-Reply-To: <3D82996B-4F67-40A1-81BC-988B3FB7952B@gmail.com> (message from Yuan Fu on Sat, 15 Apr 2023 22:54:29 -0700)

> From: Yuan Fu <casouri@gmail.com>
> Date: Sat, 15 Apr 2023 22:54:29 -0700
> Cc: Po Lu <luangruo@yahoo.com>,
>  emacs-devel@gnu.org
> 
> > Btw, Yuan: any reason you couldn't use the existing assq_no_quit here?
> 
> To be very honest I didn’t know its existence before. But safe_assq is indeed necessary, because assq_no_quit assumes the list is not circular and doesn’t try to detect one.
> 
> For this particular use-case I just don’t want assq to signal any error, but I do want it to detect errors. Circular error, malformed alist, or simply couldn’t find the key, all of these will be reported to the user as “couldn’t find the key” (as an error). This is easier to understand for the user and easier for me to implement (than using unwind-protect and let assq signal).

OK, but please move the safe_assq function (under the name
assq_no_signal, I suggest) to where we have assq_no_quit, and please
explain the difference between them in the commentary.

Thanks.



  reply	other threads:[~2023-04-16  6:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <168151708682.12577.9938116109918336537@vcs2.savannah.gnu.org>
     [not found] ` <20230415000448.67F57C13A82@vcs2.savannah.gnu.org>
2023-04-15  2:43   ` master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions Po Lu
2023-04-15  6:58     ` Eli Zaretskii
2023-04-15  9:58       ` Eli Zaretskii
2023-04-16  5:54         ` Yuan Fu
2023-04-16  6:37           ` Eli Zaretskii [this message]
2023-04-16  6:42             ` Yuan Fu
2023-04-16  8:19               ` Eli Zaretskii
2023-04-17  3:37                 ` 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=83leisbaen.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.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.