- Subject: Re: [Jed-users-l] py_check_indentation
- From: "John K. Parejko" <parejkoj@xxxxxxxxx>
- Date: Fri, 10 May 2013 15:47:11 -0400
Thanks, using autoload did the trick. Works both on the first file loaded, and subsequent ones in the same window.
John
On 9May 2013, at 21:15, John E. Davis wrote:
> John K. Parejko <parejkoj@xxxxxxxxx> wrote:
>> define python_mode_hook ()
>> {
>> py_check_indentation();
>> }
>>
>> but I get this error when opening a .py file
>>
>> py_check_indentation is undefined
>>
>> during startup. It looks like .jedrc is loaded before pymode.sl is
>> loaded. How do I run a function from pymode in .jedrc?
>
> You have several alternatives. The easiest may be to use autoload:
>
> autoload ("py_check_indentation", "pymode");
> define python_mode_hook ()
> {
> py_check_indentation ();
> }
>
> You can also use code such as:
>
> define python_mode_hook ()
> {
> variable f = __get_reference ("py_check_indentation");
> if (f != NULL) (@f)();
> }
>
> Good luck,
> --John
[2013 date index]
[2013 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]