summaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/yaml-mode.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp/yaml-mode.el')
-rw-r--r--.emacs.d/lisp/yaml-mode.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/.emacs.d/lisp/yaml-mode.el b/.emacs.d/lisp/yaml-mode.el
index fc46e05..d3c1da8 100644
--- a/.emacs.d/lisp/yaml-mode.el
+++ b/.emacs.d/lisp/yaml-mode.el
@@ -123,7 +123,7 @@ that key is pressed to begin a block literal."
123 "Regexp matching a line containing only (valid) whitespace.") 123 "Regexp matching a line containing only (valid) whitespace.")
124 124
125(defconst yaml-directive-re "^\\(?:--- \\)? *%\\(\\w+\\)" 125(defconst yaml-directive-re "^\\(?:--- \\)? *%\\(\\w+\\)"
126 "Regexp matching a line contatining a YAML directive.") 126 "Regexp matching a line containing a YAML directive.")
127 127
128(defconst yaml-document-delimiter-re "^\\(?:---\\|[.][.][.]\\)" 128(defconst yaml-document-delimiter-re "^\\(?:---\\|[.][.][.]\\)"
129 "Rexexp matching a YAML document delimiter line.") 129 "Rexexp matching a YAML document delimiter line.")
@@ -368,11 +368,9 @@ back-dent the line by `yaml-indent-offset' spaces. On reaching column
368 (let ((ci (current-indentation)) 368 (let ((ci (current-indentation))
369 (need (yaml-compute-indentation))) 369 (need (yaml-compute-indentation)))
370 (save-excursion 370 (save-excursion
371 (beginning-of-line)
372 (delete-horizontal-space)
373 (if (and (equal last-command this-command) (/= ci 0)) 371 (if (and (equal last-command this-command) (/= ci 0))
374 (indent-to (* (/ (- ci 1) yaml-indent-offset) yaml-indent-offset)) 372 (indent-line-to (* (/ (- ci 1) yaml-indent-offset) yaml-indent-offset))
375 (indent-to need))) 373 (indent-line-to need)))
376 (if (< (current-column) (current-indentation)) 374 (if (< (current-column) (current-indentation))
377 (forward-to-indentation 0)))) 375 (forward-to-indentation 0))))
378 376