[code] Error in markdown lexer

From: Rena <hyperhacker.att.gmail.com>
Date: Wed, 13 Nov 2013 02:21:47 -0500

When I open an empty file with .md extension in 7.0 I get endless errors:
/home/rena/.textadept/modules/textadept/menu.lua:374: attempt to index a
function value

Menu.lua is: http://sprunge.us/ECQF
Specifically the problem line is: M.set_contextmenu(_M[lang] and
_M[lang].context_menu or context_menu)

so I suppose _M[lang] is a function in this case? I changed the offending
line to:
    if _M[lang] and type(_M[lang]) ~= 'function' then
      M.set_contextmenu(_M[lang].context_menu or context_menu)
    else M.set_contextmenu(context_menu)
    end
and that seems to have fixed it.

-- 
Sent from my Game Boy.
-- 
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 Wed 13 Nov 2013 - 02:21:47 EST

This archive was generated by hypermail 2.2.0 : Wed 13 Nov 2013 - 06:42:05 EST