Re: [code] Tabs and Indentation by file type

From: Mitchell <>
Date: Sun, 25 Aug 2013 13:19:52 -0400 (EDT)


On Mon, 19 Aug 2013, Mitchell wrote:

> Hi,
> On Sun, 18 Aug 2013, Robert Gieseke wrote:
>> Am 8/18/13 12:16 PM, schrieb Michael Richter:
>>> 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.
>> You're right, sorry. This commit [1] (after the 6.6 release) changed the
>> emitting of the event to happen always:
>> "Always emit `events.LANGUAGE_MODULE_LOADED`;
>> modules/textadept/mime_types.lua
>> Creates an empty language-specific module if none exists. This enables
>> users to
>> add keys and snippets for any lexer without an existing language-specific
>> module. It also allows themes to override styles for any lexer."
>>> When else can the type of a file be automatically determined?
>> You could switch to Textadept 7 (I use it all the time … and just tested
>> the snippet with a clean init.lua), create a language module or maybe hook
>> into the file_opened event,
>> along the lines of:
>> events.connect(events.FILE_OPENED, function()
>> if buffer.filename == 'Makefile' then
>> -- ... set tab properties
>> end
>> end)
>> Mitchell, maybe the 'LANGUAGE_MODULE_LOADED' should be renamed to
> Sorry for all of the confusion. I agree that the current event name is a poor
> choice. I will change it to something else for the next release, but I'm not
> sure what exactly yet. The event method is the way to go though for 7.X.

I've renamed the event to 'LEXER_LOADED' in hg. I also reverted Robert's
referenced changeset because it was a bad idea for me to "auto-create"
non-existant modules; it's bound to lead to confusion.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sun 25 Aug 2013 - 13:19:52 EDT

This archive was generated by hypermail 2.2.0 : Mon 26 Aug 2013 - 06:34:55 EDT