From murdoch at stats.uwo.ca  Sat Apr 18 16:23:25 2009
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Sat, 18 Apr 2009 10:23:25 -0400
Subject: [Rd] print.closure at the R level
In-Reply-To: <49E9DFE5.7060501@dbmail.com>
References: <49E9DFE5.7060501@dbmail.com>
Message-ID: <49E9E25D.9070106@stats.uwo.ca>

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



[Rd] print.closure at the R level
Duncan Murdoch