From 8fa2c474069f08b0316d6e1d5ef6260c3960593b Mon Sep 17 00:00:00 2001 From: Zhang Chiyuan Date: Thu, 15 Jan 2009 07:34:30 +0000 Subject: [PATCH] A workaround for fixing c-electric- serial command (Issue 27) --- yasnippet.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/yasnippet.el b/yasnippet.el index 9d43558..925bfb4 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -1594,6 +1594,13 @@ handle the end-of-buffer error fired in it by calling ad-do-it (error (message (error-message-string err))))) +;; disable c-electric-* serial command in YAS fields +(add-hook 'c-mode-common-hook + '(lambda () + (make-variable-buffer-local 'yas/minor-mode-map) + (dolist (k '(":" ">" "}" "{" ";")) + (define-key yas/minor-mode-map + k 'self-insert-command)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Contents of dropdown-list.el