From 6d19b3eb12db9de9440fa881bd34b6dcb352d721 Mon Sep 17 00:00:00 2001 From: Zhang Chiyuan Date: Fri, 7 Mar 2008 10:45:36 +0000 Subject: [PATCH] no need to lookup local keymap: if there's one, yas/expand shouldn't be executed. --- yasnippet.el | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/yasnippet.el b/yasnippet.el index d5667f6..f83e54a 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -626,17 +626,13 @@ hierarchy." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun yas/default-trigger-fallback () "Default fallback when a snippet expansion failed. -The default behavior is first lookup if there's binding for -in local keymap. If found, execute it. If not found, then look up -binding for TAB. If still not found, run `indent-for-tab-command'." +It looks key binding for TAB. If found, execute it. If not found. +Run `indent-for-tab-command'." (interactive) - (let ((command (local-key-binding (kbd "")))) + (let ((command (key-binding (kbd "TAB")))) (if command (call-interactively command) - (setq command (key-binding (kbd "TAB"))) - (if command - (call-interactively command) - (call-interactively 'indent-for-tab-command))))) + (call-interactively 'indent-for-tab-command)))) (defun yas/about () (interactive)