]> code.delx.au - gnu-emacs-elpa/blobdiff - yasnippet.el
only hippie-expand when yas/minor-mode is on
[gnu-emacs-elpa] / yasnippet.el
index 69105fd9c99d065a63d6587b0c6b96ccedbb5034..4a74157ceecd652ee69f3b9f71041a8b816dadce 100644 (file)
@@ -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: