jed-users mailing list

[2013 Date Index] [2013 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [Jed-users-l] py_check_indentation


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]