Re: [code] Tabs and Indentation by file type

From: Michael Richter <ttmrichter.att.gmail.com>
Date: Sun, 18 Aug 2013 18:16:07 +0800

I'm running 6.6. The problem is that there *IS* no language module for
makefiles. There's just a lexer. Instrumenting the events.connect call
and it doesn't even run for Makefiles. It runs for Lua, though.

When else can the type of a file be automatically determined?

On 18 August 2013 17:39, Robert Gieseke <rob.g.att.web.de> wrote:

> Am 8/18/13 11:32 AM, schrieb Michael Richter:
>
>> I'd tried that already. No dice. Cutting and pasting exactly the code
>> you
>> typed above still gives me Makefiles with spaces: 2.
>>
>>
>>>> try this in your init.lua:
>>>
>>> events.connect(events.****LANGUAGE_MODULE_LOADED, function(lang)
>>>
>>> if lang == 'makefile' then
>>> buffer.use_tabs = true
>>> buffer.tab_width = 8
>>> end
>>> end)
>>>
>>
> Ok, the '**' don't belong there, but that's probably not the problem.
> Can you try with a clean init.lua?
> You can create a temporary one with, textadept -u ~/tmp/test
> (if you are on Linux, similarly on other platforms) and edit the init.lua
> in this directory.
> Maybe you already have a 'makefile' module from an earlier attempt?
>
> Also, which version are you using?
> events.LANGUAGE_MODULE_LOADED was introduced in 6.6.
> I use the latest 7 beta.
>
> 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.
>
>

-- 
"Perhaps people don't believe this, but throughout all of the discussions
of entering China our focus has really been what's best for the Chinese
people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-- 
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 Sun 18 Aug 2013 - 06:16:07 EDT

This archive was generated by hypermail 2.2.0 : Sun 18 Aug 2013 - 06:37:34 EDT