Fix snippet-dirs order allowing custom snippets to override defaults

This commit is contained in:
2012-08-11 14:13:25 +01:00
parent 8a0e5ea28a
commit c18e9a3109
2 changed files with 9 additions and 2 deletions

View File

@@ -85,7 +85,6 @@
'(whitespace-action nil)
'(winner-mode t nil (winner))
'(yas/global-mode t nil (yasnippet))
'(yas/snippet-dirs (quote ("~/.emacs.d/snippets" "~/.emacs.d/el-get/yasnippet/snippets")) nil (yasnippet))
'(yas/use-menu t))
(custom-set-faces
;; custom-set-faces was added by Custom.

View File

@@ -138,7 +138,15 @@
(require 'linum+)
;; Load full-ack
(require 'full-ack))
(require 'full-ack)
;; Load yasnippet and set snippet dirs in reverse to default order allowing
;; my own user-defined snippets to override default snippets.
(when (require 'yasnippet nil 'noerror)
(setq yas/snippet-dirs (list (when yas/load-file-name
(concat (file-name-directory yas/load-file-name)
"snippets"))
"~/.emacs.d/snippets"))))
;;