Re: [code] Tabs and Indentation by file type

From: Mitchell <>
Date: Mon, 19 Aug 2013 11:17:50 -0400 (Eastern Daylight Time)


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.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Mon 19 Aug 2013 - 11:17:50 EDT

This archive was generated by hypermail 2.2.0 : Tue 20 Aug 2013 - 06:28:26 EDT