From 5ed6adadcec13565700dc431fb2a5ba6f0a70df4 Mon Sep 17 00:00:00 2001 From: Le Wang Date: Tue, 5 Jun 2012 00:08:44 +0800 Subject: [PATCH] only hippie-expand when yas/minor-mode is on --- yasnippet.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/yasnippet.el b/yasnippet.el index 69105fd..4a74157 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -2026,11 +2026,12 @@ will only be expanded when the condition evaluated to non-nil." (defun yas/hippie-try-expand (first-time?) "Integrate with hippie expand. Just put this function in `hippie-expand-try-functions-list'." - (if (not first-time?) - (let ((yas/fallback-behavior 'return-nil)) - (yas/expand)) - (undo 1) - nil)) + (when yas/minor-mode + (if (not first-time?) + (let ((yas/fallback-behavior 'return-nil)) + (yas/expand)) + (undo 1) + nil))) ;;; Apropos condition-cache: