aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/ext/mime_types.lua3
-rw-r--r--core/file_io.lua2
2 files changed, 3 insertions, 2 deletions
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