* Elisp - Determine if variable is nil
@ 2021-01-30 14:16 jai-bholeki
2021-01-30 14:57 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-30 15:02 ` Jean Louis
0 siblings, 2 replies; 4+ messages in thread
From: jai-bholeki @ 2021-01-30 14:16 UTC (permalink / raw)
To: Help Gnu Emacs
How can I check if a variable is nil?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Elisp - Determine if variable is nil
2021-01-30 14:16 Elisp - Determine if variable is nil jai-bholeki
@ 2021-01-30 14:57 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-30 15:03 ` jai-bholeki
2021-01-30 15:02 ` Jean Louis
1 sibling, 1 reply; 4+ messages in thread
From: moasenwood--- via Users list for the GNU Emacs text editor @ 2021-01-30 14:57 UTC (permalink / raw)
To: help-gnu-emacs
jai-bholeki wrote:
> How can I check if a variable is nil?
(setq some-var nil)
(unless some-var
(message "var is nil") )
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Elisp - Determine if variable is nil
2021-01-30 14:16 Elisp - Determine if variable is nil jai-bholeki
2021-01-30 14:57 ` moasenwood--- via Users list for the GNU Emacs text editor
@ 2021-01-30 15:02 ` Jean Louis
1 sibling, 0 replies; 4+ messages in thread
From: Jean Louis @ 2021-01-30 15:02 UTC (permalink / raw)
To: help-gnu-emacs
* jai-bholeki@gmx.com <jai-bholeki@gmx.com> [2021-01-30 17:34]:
> How can I check if a variable is nil?
If variable is defined then:
(null variable)
Return t if OBJECT is nil, and return nil otherwise.
Jean
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Elisp - Determine if variable is nil
2021-01-30 14:57 ` moasenwood--- via Users list for the GNU Emacs text editor
@ 2021-01-30 15:03 ` jai-bholeki
0 siblings, 0 replies; 4+ messages in thread
From: jai-bholeki @ 2021-01-30 15:03 UTC (permalink / raw)
To: moasenwood; +Cc: help-gnu-emacs
When using pcase, do I need parenthesis around
dfv-break-comments-state?
(pcase dfv-break-comments-state
(pcase (dfv-break-comments-state)
> Sent: Sunday, January 31, 2021 at 2:57 AM
> From: "moasenwood--- via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Elisp - Determine if variable is nil
>
> jai-bholeki wrote:
>
> > How can I check if a variable is nil?
>
> (setq some-var nil)
>
> (unless some-var
> (message "var is nil") )
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-30 15:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-30 14:16 Elisp - Determine if variable is nil jai-bholeki
2021-01-30 14:57 ` moasenwood--- via Users list for the GNU Emacs text editor
2021-01-30 15:03 ` jai-bholeki
2021-01-30 15:02 ` Jean Louis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).