branch: elpa/yaml-mode commit 162f7e4c4a6062579b8681fcf0f2f5b4501e5ff4 Author: Wilfred Hughes <m...@wilfred.me.uk> Commit: Wilfred Hughes <m...@wilfred.me.uk>
Treat alias nodes as punctuation Previously, Emacs did not understand that &foo and *foo related to the same symbol, so tools like highlight-symbol-mode did not work. Relevant section of the YAML spec: http://yaml.org/spec/1.2/spec.html#id2786196 --- yaml-mode.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yaml-mode.el b/yaml-mode.el index 615de6f..90e2109 100644 --- a/yaml-mode.el +++ b/yaml-mode.el @@ -203,6 +203,8 @@ that key is pressed to begin a block literal." (modify-syntax-entry ?\\ "\\" syntax-table) (modify-syntax-entry ?- "_" syntax-table) (modify-syntax-entry ?_ "_" syntax-table) + (modify-syntax-entry ?& "." syntax-table) + (modify-syntax-entry ?* "." syntax-table) (modify-syntax-entry ?\( "." syntax-table) (modify-syntax-entry ?\) "." syntax-table) (modify-syntax-entry ?\{ "(}" syntax-table)