diff options
author | Mark H Weaver <mhw@netris.org> | 2018-10-14 01:32:58 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2018-10-14 01:37:37 -0400 |
commit | b44f505f1571fc9c42e58982f161a9cfc81fb7f4 (patch) | |
tree | 8bbc4330795f030ca14da829b618f2b762c5c6aa /libguile | |
parent | b9cf3517efd4643670d970d2692bc7bede9a85e8 (diff) |
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')
-rw-r--r-- | libguile/boolean.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libguile/boolean.c b/libguile/boolean.c index f8c773839..635c14905 100644 --- a/libguile/boolean.c +++ b/libguile/boolean.c @@ -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)); |