mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
fix: need to intern marker symbols somewhere, otherwise they won't match
This commit is contained in:
parent
5d93e83375
commit
21986d92fd
14
snippet.el
14
snippet.el
@ -111,15 +111,14 @@
|
|||||||
(if parent-field-sym
|
(if parent-field-sym
|
||||||
(format "-son-of-%s" parent-field-sym)
|
(format "-son-of-%s" parent-field-sym)
|
||||||
""))))
|
""))))
|
||||||
|
|
||||||
|
(defvar snippet--marker-sym-obarray (make-vector 100 nil))
|
||||||
|
|
||||||
(defun snippet--start-marker-name (sym)
|
(defun snippet--start-marker-name (sym)
|
||||||
(make-symbol (format "%s-beg" sym)))
|
(intern (format "%s-beg" sym) snippet--marker-sym-obarray))
|
||||||
|
|
||||||
(defun snippet--end-marker-name (sym)
|
(defun snippet--end-marker-name (sym)
|
||||||
(make-symbol (format "%s-end" sym)))
|
(intern (format "%s-end" sym) snippet--marker-sym-obarray))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defvar snippet--form-mirror-sym-idx nil)
|
(defvar snippet--form-mirror-sym-idx nil)
|
||||||
|
|
||||||
@ -258,7 +257,7 @@ I would need these somewhere in the let* form
|
|||||||
(snippet--field-text ,source-sym))))
|
(snippet--field-text ,source-sym))))
|
||||||
|
|
||||||
|
|
||||||
(defmacro define-snippet (name args &rest body)
|
(defmacro define-snippet (name _args &rest body)
|
||||||
"Define NAME as a snippet.
|
"Define NAME as a snippet.
|
||||||
|
|
||||||
NAME's function definition is set to a function with no arguments
|
NAME's function definition is set to a function with no arguments
|
||||||
@ -338,7 +337,6 @@ can be:
|
|||||||
(field 2)
|
(field 2)
|
||||||
(mirror 1 (if (string-match "%" field-text) "\);" "")))
|
(mirror 1 (if (string-match "%" field-text) "\);" "")))
|
||||||
|
|
||||||
|
|
||||||
(define-snippet foo ()
|
(define-snippet foo ()
|
||||||
(field 1 "bla")
|
(field 1 "bla")
|
||||||
"ble"
|
"ble"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user