bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical bin


From: Michael Heerdegen
Subject: bug#49116: 28.0.50; Why `bound-and-true-p' is not working in lexical binding?
Date: Wed, 23 Jun 2021 01:00:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jean Louis <bugs@gnu.support> writes:

> (defun verify-direction (timestamp &optional direction)
>   (cond ((bound-and-true-p direction) (message "OK"))))
>
> (verify-direction "10:00" t) ⇒ nil

BTW, if your original intention was to check whether a function argument
has been specified in a function call (including nil) -- optional
arguments in `cl-defun' support such a feature.

Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]