From romain.francois at dbmail.com  Sat Apr 18 22:37:05 2009
From: romain.francois at dbmail.com (Romain Francois)
Date: Sat, 18 Apr 2009 22:37:05 +0200
Subject: [Rd] print.closure at the R level
In-Reply-To: <49E9E25D.9070106@stats.uwo.ca>
References: <49E9DFE5.7060501@dbmail.com> <49E9E25D.9070106@stats.uwo.ca>
Message-ID: <49EA39F1.2010709@dbmail.com>

Duncan Murdoch wrote:
> On 18/04/2009 10:12 AM, Romain Francois wrote:
>> Hello,
>>
>> Could the code that auto prints a function/closure be extracted from 
>> print.c so that there would be a print.closure function.
>> I would like to be able to mask a print.closure function so that I 
>> have a custom auto-print. One reason for that is I plan to have 
>> syntax highlighting within the R console.
>
> The class of a closure is "function", so you'd want the method to be 
> print.function.  Currently that doesn't work for auto printing, so 
> your suggestion is still interesting.  (I'm not sure why auto printing 
> is special here...)
>
> Duncan Murdoch
The attached patch implements exposing the print.function at the R level.

Romain

-- 
Romain Francois
Independent R Consultant
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr


-------------- next part --------------
A non-text attachment was scrubbed...
Name: printfunction.diff
Type: text/x-patch
Size: 4085 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20090418/78735b9a/attachment.bin>


[Rd] print.closure at the R level
Romain Francois