mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
Improve the documentation for 'nil?'.
* libguile/boolean.c (scm_nil_p): Improve docstring. * doc/ref/api-languages.texi (Nil): Add documentation for 'nil?', along with a description of how Elisp interprets Scheme booleans and end-of-list.
This commit is contained in:
parent
e4da1b456a
commit
0c0a658c56
2 changed files with 30 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright 1995-1996,2000-2001,2006,2008-2011,2018
|
||||
/* Copyright 1995-1996,2000-2001,2006,2008-2011,2018,2019
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Guile.
|
||||
|
@ -65,7 +65,15 @@ SCM_DEFINE (scm_not, "not", 1, 0, 0,
|
|||
|
||||
SCM_DEFINE (scm_nil_p, "nil?", 1, 0, 0,
|
||||
(SCM x),
|
||||
"Return @code{#t} iff @var{x} is nil, else return @code{#f}.")
|
||||
"Return @code{#t} if @var{x} would be interpreted as @code{nil}\n"
|
||||
"by Emacs Lisp code, else return @code{#f}.\n"
|
||||
"\n"
|
||||
"@example\n"
|
||||
"(nil? #nil) @result{} #t\n"
|
||||
"(nil? #f) @result{} #t\n"
|
||||
"(nil? '()) @result{} #t\n"
|
||||
"(nil? 3) @result{} #f\n"
|
||||
"@end example")
|
||||
#define FUNC_NAME s_scm_nil_p
|
||||
{
|
||||
return scm_from_bool (scm_is_lisp_false (x));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue