mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +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
b9cf3517ef
commit
b44f505f15
2 changed files with 31 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (C) 1995, 1996, 2000, 2001, 2006, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1996, 2000, 2001, 2006, 2008-2011, 2018
|
||||
* Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
|
@ -64,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