diff options
author | Mark H Weaver <mhw@netris.org> | 2018-10-14 01:32:58 -0400 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2019-05-23 15:53:55 +0200 |
commit | 0c0a658c564c4c585d740c8ccf16b889f996ac3f (patch) | |
tree | 16b3d0f07c9a7abea29b7ff4eaff0daa02c75093 /libguile/boolean.c | |
parent | e4da1b456a71be2b344eb3fa3f3fdfe44c669bc0 (diff) | |
download | guile-0c0a658c564c4c585d740c8ccf16b889f996ac3f.tar.gz |
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.
Diffstat (limited to 'libguile/boolean.c')
-rw-r--r-- | libguile/boolean.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libguile/boolean.c b/libguile/boolean.c index 659d8d438..e8370331f 100644 --- a/libguile/boolean.c +++ b/libguile/boolean.c @@ -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)); |