aboutsummaryrefslogtreecommitdiff
path: root/core/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/init.lua')
-rw-r--r--core/init.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/init.lua b/core/init.lua
index 7fc94052..57d06a3d 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -9,6 +9,7 @@ end
_THEME = ''
require 'iface'
+require 'locale'
require 'events'
require 'file_io'
if not MAC then
@@ -22,10 +23,11 @@ end
-- if the check fails.
-- @param buffer The buffer in question.
function textadept.check_focused_buffer(buffer)
+ local locale = textadept.locale
if type(buffer) ~= 'table' or not buffer.doc_pointer then
- error('Buffer argument expected.', 2)
+ error(locale.ERR_BUFFER_EXPECTED, 2)
elseif textadept.focused_doc_pointer ~= buffer.doc_pointer then
- error('The indexed buffer is not the focused one.', 2)
+ error(locale.ERR_BUFFER_NOT_FOCUSED, 2)
end
end