* get fixed indentation working
  * merge from trunk
  * try to implement snippet-local vars
  * implement a command `find-snippet-file' that defaults to the dir and sets `yas/snippet-editing-mode'
This commit is contained in:
capitaomorte 2009-07-15 16:18:44 +00:00
parent 63378d00b2
commit 5c7e870891

View File

@ -1893,6 +1893,28 @@ When multiple expressions are found, only the last one counts."
(set-marker (yas/field-end field) (point)))
t))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Major mode stuff
;;
(defvar yas/font-lock-keywords
(append '(("^#.*$" . font-lock-comment-face))
lisp-font-lock-keywords
lisp-font-lock-keywords-1
lisp-font-lock-keywords-2
'(("$\\([0-9]+\\)"
(0 font-lock-keyword-face)
(1 font-lock-string-face t))
("${\\([0-9]+\\):?"
(0 font-lock-keyword-face)
(1 font-lock-warning-face t))
("\\(\\$\\)(" 1 font-lock-preprocessor-face)
("}"
(0 font-lock-keyword-face)))))
(define-derived-mode yas/snippet-editing-mode emacs-lisp-mode "YASnippet"
"A mode for editing yasnippets"
(setq font-lock-defaults '(yas/font-lock-keywords)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Debug functions. Use (or change) at will whenever needed.
;;