diff --git a/yasnippet.el b/yasnippet.el index ccef85d..660173a 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -1916,7 +1916,8 @@ prefix argument." (defun yas-escape-text (text) "Escape TEXT for snippet." - (replace-regexp-in-string "[\\$]" "\\\\\\&" text)) + (when text + (replace-regexp-in-string "[\\$]" "\\\\\\&" text))) ;;; Snippet compilation function