Remove oni:load-hippie-exp

Placing `yas/hippie-try-expand' at the end of the
`hippie-expand-try-functions-list' doesn't seem to work very well and
putting it in the front might cause situations where I want to expand
a variable name or something and yas might take over, so don't use yas
with hippie-expand.  Instead bind `yas-expand' to `C-\' and set
`yas-fallback-behavior' to nil so it doesn't start acting crazy when
there's no snippet to expand.
This commit is contained in:
Tom Willemsen 2012-12-17 12:11:03 +01:00
parent 36541fa512
commit c8b34bbdad
2 changed files with 3 additions and 14 deletions

View file

@ -104,9 +104,6 @@
'flymake-allowed-file-name-masks ; flymaking 'easy'.
'("\\.go$" flymake-simple-make-init))))
(eval-after-load "hippie-exp"
'(oni:load-hippie-exp 'yasnippet))
(eval-after-load "ido"
'(setq ido-ignore-buffers `(,@ido-ignore-buffers
"^\\*.*\\*$" "^irc\\." "^\\#")))
@ -125,9 +122,6 @@
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "C-M-x") 'smex-major-mode-commands)))
(eval-after-load "yasnippet"
'(oni:load-hippie-exp 'hippie-exp))
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
(put 'narrow-to-region 'disabled nil)
@ -298,6 +292,7 @@
(setq user-mail-address "tom@ryuslash.org")
(setq w3m-fill-column 72)
(setq window-combination-resize t)
(setq yas-fallback-behavior nil)
(setq yas-prompt-functions '(yas-ido-prompt))
(add-hook 'after-change-major-mode-hook 'set-current-mode-icon)

View file

@ -287,13 +287,6 @@ If COUNT has been specified indent by that much, otherwise look at
(kill-region (region-beginning) (region-end))
(kill-line)))
(defun oni:load-hippie-exp (other)
"Make sure both hippie-expand and yasnippet are loaded in order
to add yasnippet's expand function to hippie-expand."
(require other)
(add-to-list 'hippie-expand-try-functions-list
'yas/hippie-try-expand t))
(defun oni:lua-mode-func()
"Function for `lua-mode-hook'."
(local-unset-key (kbd ")"))
@ -626,7 +619,8 @@ for easy selection."
(defun oni:yas-minor-mode-func ()
"Function for `yas-minor-mode-hook'."
(define-key yas-minor-mode-map (kbd "TAB") nil)
(define-key yas-minor-mode-map [(tab)] nil))
(define-key yas-minor-mode-map [(tab)] nil)
(define-key yas-minor-mode-map (kbd "C-\\") 'yas-expand))
(define-skeleton html-tag
"Testing creation of an html tag"