From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Question about documented functions Date: Sat, 16 Mar 2019 16:05:46 +0200 Message-ID: <83pnqqykw5.fsf@gnu.org> References: <83bm2e35a1.fsf@gnu.org> <20190314030224.l5zseslncw3xc5ox@Ergus> <835zsm2c2s.fsf@gnu.org> <20190314165147.gmtwgzqaibwbzhbm@Ergus> <83r2b91flg.fsf@gnu.org> <20190314211313.giyz7p6jtmquabea@Ergus> <83bm2c1smi.fsf@gnu.org> <20190316093610.qcjqflorltiyn42a@Ergus> <148A8049-9303-4984-8046-1E55D674D28F@aol.com> <83zhpvxb5a.fsf@gnu.org> <20190316135334.aonyjuksw5fw2bm3@Ergus> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="233080"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 16 15:06:12 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h59wx-000yWr-Cx for ged-emacs-devel@m.gmane.org; Sat, 16 Mar 2019 15:06:11 +0100 Original-Received: from localhost ([127.0.0.1]:42327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h59ww-0003lZ-EI for ged-emacs-devel@m.gmane.org; Sat, 16 Mar 2019 10:06:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h59wq-0003lI-Ne for emacs-devel@gnu.org; Sat, 16 Mar 2019 10:06:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59807) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h59wo-00085l-BW; Sat, 16 Mar 2019 10:06:02 -0400 Original-Received: from [176.228.60.248] (port=2876 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h59wn-0003qz-5q; Sat, 16 Mar 2019 10:06:02 -0400 In-reply-to: <20190316135334.aonyjuksw5fw2bm3@Ergus> (message from Ergus on Sat, 16 Mar 2019 14:53:34 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234216 Archived-At: > Date: Sat, 16 Mar 2019 14:53:34 +0100 > From: Ergus > Cc: emacs-devel@gnu.org > > The problem is that I was trying to figure out the canonical method to > check if a variable was: t from C code (or assign t to a "DEFVAR_LISP" > defined variable). I was looking for something similar to NILP but I > couldn't get it. Use Qt in C to refer to the symbol t. Like this: Lisp_Object foo = Qt; /* assignment */ ... if (EQ (some_object, Qt)) /* test for equality to t */ ... > It will be helpful for new people (like me), some explanations about > each of them. Expected arguments, and or objectives. And comments like > XFIXNUM can crash so it is needed to protect the code with an if > FIXNUMP. And then what CHECK_FIXNUM is useful for. > > I know I need to read more, but it was a bit confusing to figure out the > difference between FIXNUM and FIXNAT. > > And functions that are lisp equivalents (CAR CRD) could say that so > newbies can refer to the elisp manual to look for it. OK, I will try to add some more commentary when I have time.