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

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

Re: Comparing against the single-quote symbol '


From: David Kastrup
Subject: Re: Comparing against the single-quote symbol '
Date: Tue, 10 Jun 2008 19:07:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Nordlöw <per.nordlow@gmail.com> writes:

> How do I explicitly compare against the single-quote symbol ' in emacs
> lisp programs?
>
> I thought I could use this expression
>   (equal prefix \')
>
> where the value the symbol `prefix' is
>   \'
>
> but \' is not allowed in lisp-code;

Since when?

> it complains about void variable \'

Sure.  The symbol \' has no variable value by default.  If you don't
want to access its variable value but rather its symbol, you need to
quote it.  And sure enough
'\'
works just fine (even though it looks misleadingly symmetric).

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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