[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search fun
From: |
Eli Zaretskii |
Subject: |
Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions |
Date: |
Sat, 15 Apr 2023 12:58:15 +0300 |
> Date: Sat, 15 Apr 2023 09:58:09 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org, casouri@gmail.com
>
> > From: Po Lu <luangruo@yahoo.com>
> > Cc: Yuan Fu <casouri@gmail.com>
> > Date: Sat, 15 Apr 2023 10:43:21 +0800
> >
> > Yuan Fu <casouri@gmail.com> writes:
> >
> > > +/* Assq but doesn't signal. */
> > > +static Lisp_Object
> > > +safe_assq (Lisp_Object key, Lisp_Object alist)
> > > +{
> > > + Lisp_Object tail = alist;
> > > + FOR_EACH_TAIL_SAFE (tail)
> > > + if (CONSP (XCAR (tail)) && EQ (XCAR (XCAR (tail)), key))
> > > + return XCAR (tail);
> > > + return Qnil;
> > > +}
> >
> > Please, write more descriptive doc strings. I would write:
> >
> > /* Like `assq_no_quit', except it avoids chasing after circular
> > lists. */
>
> It is more efficient to just go ahead and make minor changes like
> that, than start discussions about them.
Btw, Yuan: any reason you couldn't use the existing assq_no_quit here?
- Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions, Po Lu, 2023/04/14
- Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions, Eli Zaretskii, 2023/04/15
- Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions,
Eli Zaretskii <=
- Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions, Yuan Fu, 2023/04/16
- Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions, Eli Zaretskii, 2023/04/16
- Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions, Yuan Fu, 2023/04/16
- Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions, Eli Zaretskii, 2023/04/16
- Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions, Yuan Fu, 2023/04/16