From 5a2757d809ea3bb7a27877b8ac7e071e322f9413 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 12 Jul 2009 13:03:56 -0400 Subject: Lua code cleanup. --- core/ext/mime_types.lua | 3 ++- core/file_io.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/ext/mime_types.lua b/core/ext/mime_types.lua index a1867437..7fb7fcab 100644 --- a/core/ext/mime_types.lua +++ b/core/ext/mime_types.lua @@ -45,11 +45,12 @@ end --- -- [Local function] Replacement for buffer:set_lexer_language(). --- Sets a buffer._lexer field so it can be restored without querying the +-- Sets a buffer._lexer field so it can be restored without querying the -- mime-types tables. Also if the user manually sets the lexer, it should be -- restored. -- @param buffer The buffer to set the lexer language of. -- @param lang The string language to set. +-- @usage buffer:set_lexer('language_name') local function set_lexer(buffer, lang) buffer._lexer = lang buffer:set_lexer_language(lang) diff --git a/core/file_io.lua b/core/file_io.lua index bf0809cd..3d184c36 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -331,7 +331,7 @@ function load_session(filename, only_pm) local anchor, current_pos, first_visible_line, filename = line:match('^buffer: (%d+) (%d+) (%d+) (.+)$') if not filename:find('^%[.+%]$') then - textadept.io.open(filename or '', 'rb') + textadept.io.open(filename or '') else textadept.new_buffer() buffer._type = filename -- cgit v1.2.3