]> code.delx.au - gnu-emacs-elpa/blobdiff - yasnippet.el
Simplify string matching.
[gnu-emacs-elpa] / yasnippet.el
index 50973e9df06b6cb1948c5157e62ee335d6f672ff..77702eb4931b58af75d5cbd1603d85fd3f8a5e2c 100644 (file)
@@ -4049,9 +4049,8 @@ When multiple expressions are found, only the last one counts."
                                    ;; after the ":", this will be
                                    ;; caught as a mirror with
                                    ;; transform later.
-                                   (not (save-match-data
-                                          (eq (string-match "$[ \t\n]*("
-                                                            (match-string-no-properties 2)) 0)))
+                                   (not (string-match-p "\\`\\$[ \t\n]*("
+                                                        (match-string-no-properties 2)))
                                    ;; allow ${0: some exit text}
                                    ;; (not (and number (zerop number)))
                                    (yas--make-field number