mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
Got to:
* 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:
parent
63378d00b2
commit
5c7e870891
22
yasnippet.el
22
yasnippet.el
@ -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.
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user