From: Eli Zaretskii <eliz@is.elta.co.il>
Cc: emacs-devel@gnu.org
Subject: Re: variable type
Date: Thu, 7 Mar 2002 13:14:16 +0200 (IST) [thread overview]
Message-ID: <Pine.SUN.3.91.1020307131143.10175E@is> (raw)
In-Reply-To: <20020307.084637.59481548.wl@gnu.org>
[Redirected to emacs-devel, where these issues should be discussed.]
On Thu, 7 Mar 2002, Werner LEMBERG wrote:
> How shall I define a variable which has the following properties:
>
> If nil, don't use it.
> If t, use value 0.
> If a positive integer, use it.
>
> My idea is to represent this in C as an integer where nil maps to -1.
I'd define it as a Lisp_Object, and then use NATNUMP, STRINGP, NILP, etc.
to see what its type and extract the value. Emacs sources do that quite
a lot.
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
parent reply other threads:[~2002-03-07 11:14 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20020307.084637.59481548.wl@gnu.org>]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.SUN.3.91.1020307131143.10175E@is \
--to=eliz@is.elta.co.il \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).