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

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

Re: How to prepare a regexp as arg for a funcall?


From: Thorsten Jolitz
Subject: Re: How to prepare a regexp as arg for a funcall?
Date: Sat, 23 Feb 2013 10:10:09 +0100
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.2 (gnu/linux)

Barry Margolin <address@hidden> writes:

>> I want to use (funcall `(occur ,REGEXP)) in a program, but encounter
>> unexpected problems in preparing the regexp with the right numbers of
>> '\'. 
>
> Forgetting the regexp problem, what do you expect that to do? The first 
> argument to funcall should be a function, not a list like (occur 
> whatever).  

You are right, I became confused between the list I evaluate and the
actual function involved. 

> (defun call-occur ()
>   (let ((rgxp (regexp-quote ";; * ")))
>     (occur rgxp)))

That solves my problem - thank you!

-- 
cheers,
Thorsten




reply via email to

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