summary refs log tree commit diff stats
path: root/ranger/api
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-12 02:18:45 +0100
committerhut <hut@lavabit.com>2010-03-12 02:18:45 +0100
commitf793be4b7caaa06a6362ae2ada3e1a0a00292400 (patch)
tree1226bd9e9d9c72d0a6719ae49de6617a6b27c20d /ranger/api
parent290286314c4c349d3ffef5e947d66e48142311fd (diff)
downloadranger-f793be4b7caaa06a6362ae2ada3e1a0a00292400.tar.gz
slightly modified keybinding syntax
Diffstat (limited to 'ranger/api')
-rw-r--r--ranger/api/keys.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/ranger/api/keys.py b/ranger/api/keys.py
index 4ac2e18e..87186378 100644
--- a/ranger/api/keys.py
+++ b/ranger/api/keys.py
@@ -22,34 +22,6 @@ from ranger import RANGERDIR
 from ranger.gui.widgets import console_mode as cmode
 from ranger.container.bookmarks import ALLOWED_KEYS as ALLOWED_BOOKMARK_KEYS
 
-def make_abbreviations(command_list):
-	def bind(*args, **keywords):
-		if keywords:
-			command_list.show(*args, **keywords)
-		else:
-			lastarg = args[-1]
-			if hasattr(lastarg, '__call__'):
-				# do the binding
-				command_list.bind(lastarg, *args[:-1])
-			else:
-				# act as a decorator. eg:
-				#    @bind('a')
-				#    def do_stuff(arg):
-				#       arg.fm.ui.do_stuff()
-				#
-				# is equivalent to:
-				#    bind('a', lambda arg: arg.fm.ui.do_stuff())
-				return lambda fnc: command_list.bind(fnc, *args)
-
-	def show(*args, **keywords):
-		command_list.show(*args, **keywords)
-
-	def alias(*args):
-		command_list.alias(*args)
-
-	return bind, alias
-
-
 class Wrapper(object):
 	def __init__(self, firstattr):
 		self.__firstattr__ = firstattr