diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-04-08 12:28:54 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-04-08 12:28:54 +0200 |
commit | ea2466fe69bd082d379e95e1567f3de0b76de243 (patch) | |
tree | 70f1bdcf7d402f2ae013caebf5f4cef5f6c2baed /context/data/scite/context/scite-ctx.lua | |
parent | e32f57c9c5968f0c09130f6e24e28a96d6e1393d (diff) | |
download | context-ea2466fe69bd082d379e95e1567f3de0b76de243.tar.gz |
2017-04-08 12:15:00
Diffstat (limited to 'context/data/scite/context/scite-ctx.lua')
-rw-r--r-- | context/data/scite/context/scite-ctx.lua | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/context/data/scite/context/scite-ctx.lua b/context/data/scite/context/scite-ctx.lua index 6df153bc2..809f36041 100644 --- a/context/data/scite/context/scite-ctx.lua +++ b/context/data/scite/context/scite-ctx.lua @@ -77,6 +77,10 @@ local sort, concat = table.sort, table.concat local crlf = "\n" +if not trace then + trace = print +end + function traceln(str) trace(str .. crlf) io.flush() @@ -234,22 +238,41 @@ end do - print("loading scite-ctx.lua definition file\n") - print("- see scite-ctx.properties for configuring info\n") - print("- ctx.spellcheck.wordpath set to " .. props['ctx.spellcheck.wordpath']) - if find(lower(props['ctx.spellcheck.wordpath']),"ctxspellpath") then - if os.getenv('ctxspellpath') then - print("- ctxspellpath set to " .. os.getenv('CTXSPELLPATH')) - else - print("- 'ctxspellpath is not set") + local wordpath = props['ctx.spellcheck.wordpath'] + + if wordpath and wordpath ~= "" then + print("loading scite-ctx.lua definition file\n") + print("- see scite-ctx.properties for configuring info\n") + print("- ctx.spellcheck.wordpath set to " .. wordpath) + if find(lower(wordpath),"ctxspellpath") then + if os.getenv('ctxspellpath') then + print("- ctxspellpath set to " .. os.getenv('CTXSPELLPATH')) + else + print("- 'ctxspellpath is not set") + end + print("- ctx.spellcheck.wordpath expands to " .. expand(wordpath)) end - print("- ctx.spellcheck.wordpath expands to " .. expand(props['ctx.spellcheck.wordpath'])) + else + print("- 'ctxspellpath is not set") end - print("\n- ctx.wraptext.length is set to " .. props['ctx.wraptext.length']) - if props['ctx.helpinfo'] ~= '' then + + local wraplength = props['ctx.wraptext.length'] + + if wraplength and wraplength ~= "" then + print("\n- ctx.wraptext.length is set to " .. wraplength) + else + print("\n- ctx.wraptext.length is not set") + end + + local helpinfo = props['ctx.helpinfo'] + + if helpinfo and helpinfo ~= "" then print("\n- key bindings:\n") - print((gsub(strip(props['ctx.helpinfo']),"%s*|%s*","\n"))) + print((gsub(strip(helpinfo),"%s*|%s*","\n"))) + else + print("\n- no extra key bindings") end + print("\n- recognized first lines:\n") print("xml <?xml version='1.0' language='nl'") print("tex % language=nl") |