updated cancel

--HG--
branch : pmacs2
This commit is contained in:
moculus 2008-06-10 18:29:19 +00:00
parent 5ec7f1d9ab
commit dce94416ac
8 changed files with 10 additions and 9 deletions

View File

@ -198,7 +198,7 @@ class Fundamental(Handler):
self.add_bindings('which-command', ('M-h',))
self.add_bindings('cmd-help-buffer', ('M-?',))
self.add_bindings('set-mode', ('C-x m',))
self.add_bindings('cancel', ('C-]',))
self.add_bindings('cancel', ('C-]', 'C-g',))
self.add_bindings('exec', ('C-c e', 'C-c !'))
self.add_bindings('grep', ('C-c g',))
self.add_bindings('pipe', ('C-c p', 'C-c |'))
@ -311,7 +311,8 @@ class Fundamental(Handler):
act.execute(self.window)
self.window.application.last_action = act.name
except ActionError, e:
if t != 'C-]':
#XYZ: HACK--should fix
if t not in ('C-]', 'C-g'):
self.window.set_error(str(e))
else:
self.window.set_error('Cancelled')

View File

@ -233,7 +233,7 @@ class ConsoleMini(mode.Fundamental):
self.hindex = 0
self.add_bindings('console-exec', ('RETURN',))
self.add_bindings('console-clear', ('C-l',))
self.add_bindings('console-cancel', ('C-]',))
self.add_bindings('console-cancel', ('C-]', 'C-g'))
self.add_bindings('console-history-prev', ('C-p', 'UP'))
self.add_bindings('console-history-next', ('C-n', 'DOWN'))
self.add_bindings('console-tab', ('TAB',))

View File

@ -260,7 +260,7 @@ class Hex(mode.Fundamental):
self.add_bindings('which-command', ('M-h',))
self.add_bindings('cmd-help-buffer', ('M-?',))
self.add_bindings('set-mode', ('C-x m',))
self.add_bindings('cancel', ('C-]',))
self.add_bindings('cancel', ('C-]', 'C-g'))
self.add_bindings('exec', ('C-c e', 'C-c !'))
self.add_bindings('grep', ('C-c g',))
self.add_bindings('pipe', ('C-c p', 'C-c |'))

View File

@ -65,7 +65,7 @@ class InsertMini(mode.Fundamental):
self.add_bindings('insert-tab', ('TAB',))
self.add_bindings('mini-insert-line', ('RETURN',))
self.add_bindings('mini-insert-complete', ('M-RETURN',))
self.add_bindings('mini-insert-cancel', ('C-]',))
self.add_bindings('mini-insert-cancel', ('C-]', 'C-g'))
self.add_bindings('mini-insert-tab', ('TAB',))
for c in string.letters + string.digits + string.punctuation:
self.add_binding('insert-string-%s' % c, c)

View File

@ -131,7 +131,7 @@ class IperlMini(mode.Fundamental):
w.application.set_mini_buffer_prompt(b.prompt)
self.add_bindings('iperl-exec', ('RETURN',))
self.add_bindings('console-clear', ('C-l',))
self.add_bindings('console-cancel', ('C-]',))
self.add_bindings('console-cancel', ('C-]', 'C-g'))
self.add_bindings('console-history-prev', ('C-p', 'UP'))
self.add_bindings('console-history-next', ('C-n', 'DOWN'))
self.add_bindings('iperl-tab', ('TAB',))

View File

@ -106,7 +106,7 @@ class IpythonMini(mode.Fundamental):
self.window.application.set_mini_buffer_prompt(b.prompt)
self.add_bindings('ipython-exec', ('RETURN',))
self.add_bindings('console-clear', ('C-l',))
self.add_bindings('console-cancel', ('C-]',))
self.add_bindings('console-cancel', ('C-]', 'C-g'))
self.add_bindings('console-history-prev', ('C-p', 'UP'))
self.add_bindings('console-history-next', ('C-n', 'DOWN'))
self.add_bindings('ipython-tab', ('TAB',))

View File

@ -134,7 +134,7 @@ class Replace(mode.Fundamental):
self.add_bindings('replace-done', ('d',))
self.add_bindings('replace-one', ('y', 'SPACE',))
self.add_bindings('skip-replace', ('n', 'DELETE',))
self.add_bindings('cancel-replace', ('q', 'RETURN', 'C-]', 'C-n', 'C-p', 'C-a', 'C-e', 'C-f', 'C-b'))
self.add_bindings('cancel-replace', ('q', 'RETURN', 'C-]', 'C-n', 'C-p', 'C-a', 'C-e', 'C-f', 'C-b', 'C-g'))
m = w.buffer.method
found = _find_next(m, False)

View File

@ -128,7 +128,7 @@ class Search(mode.Fundamental):
self.add_bindings('search-next', ('C-s',))
self.add_bindings('search-previous', ('C-r',))
self.add_bindings('end-search', ('RETURN', 'C-n', 'C-p', 'C-a', 'C-e', 'C-f', 'C-b',))
self.add_bindings('cancel-search', ('C-]',))
self.add_bindings('cancel-search', ('C-]', 'C-g',))
self.add_bindings('search-delete-left', ('DELETE', 'BACKSPACE',))
self.add_bindings('search-delete-left-word', ('M-DELETE', 'M-BACKSPACE',))