summaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/yaml-mode.el
diff options
context:
space:
mode:
authorSimeon Simeonov2021-02-10 09:13:07 +0100
committerSimeon Simeonov2021-02-10 09:13:07 +0100
commit31884d136fe18e402f8d1c83d68c005671a767c5 (patch)
tree83826812c3031f80bbb51734d4e0509aa55d70b3 /.emacs.d/lisp/yaml-mode.el
parent97d084eb0846f3c2edbb199fed7226370471cd5a (diff)
Update markdown-mode and yaml-mode
Diffstat (limited to '.emacs.d/lisp/yaml-mode.el')
-rw-r--r--.emacs.d/lisp/yaml-mode.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/.emacs.d/lisp/yaml-mode.el b/.emacs.d/lisp/yaml-mode.el
index 4914218..50d790b 100644
--- a/.emacs.d/lisp/yaml-mode.el
+++ b/.emacs.d/lisp/yaml-mode.el
@@ -7,7 +7,7 @@
7;; Maintainer: Vasilij Schneidermann <mail@vasilij.de> 7;; Maintainer: Vasilij Schneidermann <mail@vasilij.de>
8;; Package-Requires: ((emacs "24.1")) 8;; Package-Requires: ((emacs "24.1"))
9;; Keywords: data yaml 9;; Keywords: data yaml
10;; Version: 0.0.14 10;; Version: 0.0.15
11 11
12;; This file is not part of Emacs 12;; This file is not part of Emacs
13 13
@@ -117,7 +117,7 @@ that key is pressed to begin a block literal."
117 117
118;; Constants 118;; Constants
119 119
120(defconst yaml-mode-version "0.0.14" "Version of `yaml-mode'.") 120(defconst yaml-mode-version "0.0.15" "Version of `yaml-mode'.")
121 121
122(defconst yaml-blank-line-re "^ *$" 122(defconst yaml-blank-line-re "^ *$"
123 "Regexp matching a line containing only (valid) whitespace.") 123 "Regexp matching a line containing only (valid) whitespace.")
@@ -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 "[^#\n]*: *\\(?:&.*\\|{ *\\|" 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\\|\\'\\)"
@@ -322,6 +322,8 @@ artificially limited to the value of
322 (unless (looking-at yaml-blank-line-re) 322 (unless (looking-at yaml-blank-line-re)
323 (setq min-level (min min-level (current-indentation)))) 323 (setq min-level (min min-level (current-indentation))))
324 (forward-line -1)) 324 (forward-line -1))
325 (when (looking-at-p " *- ")
326 (setq min-level (- min-level 2)))
325 (cond 327 (cond
326 ((and (< (current-indentation) min-level) 328 ((and (< (current-indentation) min-level)
327 (looking-at yaml-block-literal-re)) 329 (looking-at yaml-block-literal-re))