Re: [code] Python and events.FILE_AFTER_SAVE

From: Robert Gieseke <rob.g.att.web.de>
Date: Tue, 29 Apr 2014 11:37:44 +0200

Hi Richard,

Am 29/04/14 10:37, schrieb Richard Philips:
> Hi Mitchell,
>
>
> In the Python language module, there is a syntax check connected to the
> FILE_AFTER_SAVE event.
>
> In our environment, this has itsdrawbacks:
>
> - it leaves unwanted *.pyc files
>
> - the python version used on the developer's workstation is not the same as
> the version on the server where the software is deployed.
>
>
> Nevertheless, is is an interesting feature :-)
>
> Would it be possible to make this feature optional ?
>
>

given Mitchell's reluctance to add config options you might add

events.connect(events.FILE_AFTER_SAVE, function()
   if buffer:get_lexer() == 'python' then return true end
end, 1)

to your post_init.lua to stop syntax checking
or delete any unwanted files in a similar event (without the parameter
'1' of course)

Hope this helps,
Robert

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 29 Apr 2014 - 05:37:44 EDT

This archive was generated by hypermail 2.2.0 : Tue 29 Apr 2014 - 06:51:45 EDT