Added escape syntax rule support for latex-mode

This commit is contained in:
Zhang Chiyuan 2009-02-08 04:35:18 +00:00
parent 842c3a84ce
commit 69bd61b9b2

View File

@ -44,7 +44,7 @@
"If set to t, don't activate yas/minor-mode automatically.") "If set to t, don't activate yas/minor-mode automatically.")
(make-variable-buffer-local 'yas/dont-activate) (make-variable-buffer-local 'yas/dont-activate)
(defvar yas/key-syntaxes (list "w" "w_" "w_." "^ ") (defvar yas/key-syntaxes (list "w" "w_" "w_." "w_.\\" "^ ")
"A list of syntax of a key. This list is tried in the order "A list of syntax of a key. This list is tried in the order
to try to find a key. For example, if the list is '(\"w\" \"w_\"). to try to find a key. For example, if the list is '(\"w\" \"w_\").
And in emacs-lisp-mode, where \"-\" has the syntax of \"_\": And in emacs-lisp-mode, where \"-\" has the syntax of \"_\":
@ -914,7 +914,7 @@ Here's a list of currently recognized variables:
(point-max))) (point-max)))
(setq bound (point)) (setq bound (point))
(goto-char (point-min)) (goto-char (point-min))
(while (re-search-forward "^#\\([^ ]+\\) *: *\\(.*\\)$" bound t) (while (re-search-forward "^#\\([^ ]+?\\) *: *\\(.*\\)$" bound t)
(when (string= "name" (match-string-no-properties 1)) (when (string= "name" (match-string-no-properties 1))
(setq name (match-string-no-properties 2))) (setq name (match-string-no-properties 2)))
(when (string= "condition" (match-string-no-properties 1)) (when (string= "condition" (match-string-no-properties 1))