[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Testing for symbols
From: |
Will Mengarini |
Subject: |
Re: Testing for symbols |
Date: |
Tue, 18 Oct 2022 13:37:39 -0700 |
* Heime via <help-gnu-emacs@gnu.org> [22-10/16=Su 00:18 +0000]:
> Want to test for symbols. But "eq" and "equal" both
> seem to work. What is going on and what is best to use?
>
> (setq opt 'load)
> (when (eq opt 'load) (message "eq-load"))
> (when (equal opt 'load) (message "equal-load"))
For symbols, eq always works; equal works too but is unnecessary.