Re: [code] [textadept] Textadept 7.5

From: Richard Philips <richard.philips.att.gmail.com>
Date: Sat, 12 Jul 2014 11:34:40 +0200

Hi Mitchell,

A small difference between Textadept 7.4 and 7.5:

In _USERHOME..'/modules/common/init.lua, I had the content:

local lfs = require 'lfs'
for filename in lfs.dir(_USERHOME..'/modules/common/') do
  if filename:find('%.lua$') and filename ~= 'init.lua' then
    require('common.'..filename:match('^(.+)%.lua$'))
  end
end

(Probably, I found this on the wiki somewhere: in my init.lua, the first
line is: require 'common')

In 7.4, this works perfect!

In 7.5: this does not work. The problem is solved by removing "local lfs =
require 'lfs'".

So, in _USERHOME..'/modules/common/init.lua, I have the content:

for filename in lfs.dir(_USERHOME..'/modules/common/') do
  if filename:find('%.lua$') and filename ~= 'init.lua' then
    require('common.'..filename:match('^(.+)%.lua$'))
  end
end

And all is well.

Thank you for 7.5,

Richard

-- 
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 Sat 12 Jul 2014 - 05:34:40 EDT

This archive was generated by hypermail 2.2.0 : Sat 12 Jul 2014 - 06:27:01 EDT