yatemplate
yatemplate copied to clipboard
Find new way to store regular expressions
Currently regular expressions are stored in filename. this seems to be not working well on some os (yes, windows.). May there be a new way considered to store regular expressions? Maybe in the snippet file? I currently have changed "yatemplate-regex-from-filename" to this:
;;;###autoload
(defun yatemplate-fill-alist ()
"Fill `auto-insert-alist'."
(yatemplate-remove-old-yatemplates-from-alist)
(dolist (filename (reverse (yatemplate-sorted-files-in-dir)) nil)
(let ((file-regex (yatemplate-regex-from-filename filename)))
(if file-regex
(push `(,(concat ".*" file-regex) . [,filename yatemplate-expand-yas-buffer]) ;; <----- here is change
auto-insert-alist)))))
so i can use it too... of course now i lack some expressivness when defining which files to define a template for.