emacs-devel
[Top][All Lists]
Advanced

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

Re: a question about `,' in backquote


From: Andreas Schwab
Subject: Re: a question about `,' in backquote
Date: Sun, 24 Apr 2005 20:49:53 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux)

Masatake YAMATO <address@hidden> writes:

> I found a following line in the definition of `tags-search':
>
>    (setq tags-loop-scan `(re-search-forward ',regexp nil t)
>
> Could you tell me why "'" is needed before "," ?

Because the form is passed to eval, which evaluates the function arguments
before applying them.  Thus without the quote it would effectively be
doing (eval regexp), which is not what is wanted.  Of course, the only
valid type of this argument is a string which is self-evaluating, but you
don't want to evaluate arbitrary values in the error case.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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