only hippie-expand when yas/minor-mode is on

This commit is contained in:
Le Wang 2012-06-05 00:08:44 +08:00
parent b7c54b8c6c
commit 5ed6adadce

View 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: