summaryrefslogtreecommitdiffstats
path: root/player/lua
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-25 21:59:44 +0200
committerwm4 <wm4@nowhere>2015-05-25 21:59:44 +0200
commit289705daaf2986cedd0a1ae994aeda73c4b4249e (patch)
treeb1062e4a31fc7f8b734046e7cd9c54697193de7a /player/lua
parent6bfbd4ebdcadd5c94e4e47ba9712bf550293274f (diff)
downloadmpv-289705daaf2986cedd0a1ae994aeda73c4b4249e.tar.bz2
mpv-289705daaf2986cedd0a1ae994aeda73c4b4249e.tar.xz
input: allow - as separator between commands, instead of _
Wnile it seems quite logical to me that commands use _ as word separator, while properties use -, I can't really explain the difference, and it tends to confuse users as well. So always prefer - as separator for everything. Using _ still works, and will probably forever. Not doing so would probably create too much chaos and confusion.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/defaults.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua
index 265463a8f3..2ecb83fb77 100644
--- a/player/lua/defaults.lua
+++ b/player/lua/defaults.lua
@@ -89,7 +89,7 @@ function mp.set_key_bindings(list, section, flags)
cb()
end
end
- cfg = cfg .. key .. " script_binding " ..
+ cfg = cfg .. key .. " script-binding " ..
mp.script_name .. "/" .. mangle .. "\n"
else
cfg = cfg .. key .. " " .. cb .. "\n"
@@ -187,7 +187,7 @@ local function add_binding(attrs, key, name, fn, rp)
end
msg_cb = fn
end
- attrs.bind = bind .. " script_binding " .. mp.script_name .. "/" .. name
+ attrs.bind = bind .. " script-binding " .. mp.script_name .. "/" .. name
attrs.name = name
key_bindings[name] = attrs
update_key_bindings()
@@ -464,7 +464,7 @@ function mp.osd_message(text, duration)
else
duration = tostring(math.floor(duration * 1000))
end
- mp.commandv("show_text", text, duration)
+ mp.commandv("show-text", text, duration)
end
local hook_table = {}
@@ -475,7 +475,7 @@ local function hook_run(id, cont)
if fn then
fn()
end
- mp.commandv("hook_ack", cont)
+ mp.commandv("hook-ack", cont)
end
function mp.add_hook(name, pri, cb)
@@ -485,7 +485,7 @@ function mp.add_hook(name, pri, cb)
end
local id = #hook_table + 1
hook_table[id] = cb
- mp.commandv("hook_add", name, id, pri)
+ mp.commandv("hook-add", name, id, pri)
end
local mp_utils = package.loaded["mp.utils"]