From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 67ab357cdcc 7/7: Support treesit-thing-settings in search functions Date: Sat, 15 Apr 2023 12:58:15 +0300 Message-ID: <83ttxhcvrc.fsf@gnu.org> References: <168151708682.12577.9938116109918336537@vcs2.savannah.gnu.org> <20230415000448.67F57C13A82@vcs2.savannah.gnu.org> <874jphkgqe.fsf@yahoo.com> <83mt39einy.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6367"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: casouri@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 15 11:59:03 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pncgR-0001OF-7q for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Apr 2023 11:59:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pncfi-0005aN-RL; Sat, 15 Apr 2023 05:58:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pncfg-0005aA-Pe for emacs-devel@gnu.org; Sat, 15 Apr 2023 05:58:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pncff-0000ys-Eh; Sat, 15 Apr 2023 05:58:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BvFp8dsxUwjM3ileFqauifrvdRHMp/6splXCPLI6xdI=; b=ba1Ir5Q2/0AZ h4+uqlE+ueML2syd9r4T7sf/jzAk91z/1NNljs6NwUbrVk0iqm4gePEBxSK9kA9EkG79/d5XLreja oLITdQjtBIseCptSXfZjbcFDDpmpC5GZS8lnawhUG8RhmewMWY6SOG0kLHA0Bprakak/5Ho3257Of ou/rFylViHv9A9XFwwM/b64HpdGGjLNQ0UBRPvBlzNbXNQ0GTk93+0KN9QT/RMY6mp8MXfCFw6cbq GExeItgT57+3/bvN4vt3tDeuREbfMs6pOJHxNXUVMQgcWjq9jPo6ObkhfPT3UAVoAam0+xoIK7yob ZHBGE0zZKbm2tWaMDRCjww==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pncfe-0004Z6-6V; Sat, 15 Apr 2023 05:58:14 -0400 In-Reply-To: <83mt39einy.fsf@gnu.org> (message from Eli Zaretskii on Sat, 15 Apr 2023 09:58:09 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305326 Archived-At: > Date: Sat, 15 Apr 2023 09:58:09 +0300 > From: Eli Zaretskii > Cc: emacs-devel@gnu.org, casouri@gmail.com > > > From: Po Lu > > Cc: Yuan Fu > > Date: Sat, 15 Apr 2023 10:43:21 +0800 > > > > Yuan Fu 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?