summaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
authorSimeon Simeonov2020-05-25 09:26:48 +0200
committerSimeon Simeonov2020-05-25 09:26:48 +0200
commit8249368ec4ae217361367686d33b4c8bfb8865a2 (patch)
treee140d984b98eb4b9a7b82726cbc48e4e88526f8d /.emacs.d
parent226f5277d493133338f87e5bf71bfffbf0aa7321 (diff)
Update yaml-mode
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/lisp/yaml-mode.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/.emacs.d/lisp/yaml-mode.el b/.emacs.d/lisp/yaml-mode.el
index 6bd4000..4914218 100644
--- a/.emacs.d/lisp/yaml-mode.el
+++ b/.emacs.d/lisp/yaml-mode.el
@@ -151,7 +151,7 @@ that key is pressed to begin a block literal."
151 "Regexp indicating the beginning of a scalar context.") 151 "Regexp indicating the beginning of a scalar context.")
152 152
153(defconst yaml-nested-map-re 153(defconst yaml-nested-map-re
154 (concat ".*: *\\(?:&.*\\|{ *\\|" yaml-tag-re " *\\)?$") 154 (concat "[^#]*: *\\(?:&.*\\|{ *\\|" yaml-tag-re " *\\)?$")
155 "Regexp matching a line beginning a YAML nested structure.") 155 "Regexp matching a line beginning a YAML nested structure.")
156 156
157(defconst yaml-block-literal-base-re " *[>|][-+0-9]* *\\(?:\n\\|\\'\\)" 157(defconst yaml-block-literal-base-re " *[>|][-+0-9]* *\\(?:\n\\|\\'\\)"
@@ -273,7 +273,11 @@ that key is pressed to begin a block literal."
273 ((and (char-equal ?' (char-before (1- pt))) 273 ((and (char-equal ?' (char-before (1- pt)))
274 (char-equal ?' (char-before pt))) 274 (char-equal ?' (char-before pt)))
275 (put-text-property (- pt 2) pt 275 (put-text-property (- pt 2) pt
276 'syntax-table (string-to-syntax "w"))) 276 'syntax-table (string-to-syntax "w"))
277 ;; Workaround for https://debbugs.gnu.org/41195.
278 (let ((syntax-propertize--done syntax-propertize--done))
279 ;; Carefully invalidate the last cached ppss.
280 (syntax-ppss-flush-cache (- pt 2))))
277 ;; If quote is detected as a syntactic string start but appeared 281 ;; If quote is detected as a syntactic string start but appeared
278 ;; after a non-whitespace character, then mark it as syntactic word. 282 ;; after a non-whitespace character, then mark it as syntactic word.
279 ((and (char-before (1- pt)) 283 ((and (char-before (1- pt))