[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/yaml-mode fc7bac0 092/124: Formatting fixes
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/yaml-mode fc7bac0 092/124: Formatting fixes |
Date: |
Sun, 29 Aug 2021 11:36:19 -0400 (EDT) |
branch: elpa/yaml-mode
commit fc7bac0f10ca5779117376e717c3c2206cf4d708
Author: Vasilij Schneidermann <mail@vasilij.de>
Commit: Vasilij Schneidermann <mail@vasilij.de>
Formatting fixes
---
yaml-mode.el | 47 +++++++++++++++++++++++++----------------------
1 file changed, 25 insertions(+), 22 deletions(-)
diff --git a/yaml-mode.el b/yaml-mode.el
index 25848e8..fd6b087 100644
--- a/yaml-mode.el
+++ b/yaml-mode.el
@@ -290,23 +290,26 @@ artificially limitted to the value of
(let ((begin (point))
(end (min (1+ (point-at-eol)) bound)))
(goto-char (point-at-bol))
- (while (and (looking-at yaml-blank-line-re) (not (bobp)))
+ (while (and (looking-at yaml-blank-line-re)
+ (not (bobp)))
(forward-line -1))
(let ((nlines yaml-block-literal-search-lines)
(min-level (current-indentation)))
- (forward-line -1)
- (while (and (/= nlines 0)
- (/= min-level 0)
- (not (looking-at yaml-block-literal-re))
- (not (bobp)))
- (set 'nlines (1- nlines))
- (unless (looking-at yaml-blank-line-re)
- (set 'min-level (min min-level (current-indentation))))
- (forward-line -1))
- (cond
- ((and (< (current-indentation) min-level)
- (looking-at yaml-block-literal-re))
- (goto-char end) (set-match-data (list begin end)) t)
+ (forward-line -1)
+ (while (and (/= nlines 0)
+ (/= min-level 0)
+ (not (looking-at yaml-block-literal-re))
+ (not (bobp)))
+ (setq nlines (1- nlines))
+ (unless (looking-at yaml-blank-line-re)
+ (setq min-level (min min-level (current-indentation))))
+ (forward-line -1))
+ (cond
+ ((and (< (current-indentation) min-level)
+ (looking-at yaml-block-literal-re))
+ (goto-char end)
+ (set-match-data (list begin end))
+ t)
((progn
(goto-char begin)
(re-search-forward (concat yaml-block-literal-re
@@ -347,8 +350,8 @@ back-dent the line by `yaml-indent-offset' spaces. On
reaching column
(if (and (equal last-command this-command) (/= ci 0))
(indent-to (* (/ (- ci 1) yaml-indent-offset) yaml-indent-offset))
(indent-to need)))
- (if (< (current-column) (current-indentation))
- (forward-to-indentation 0))))
+ (if (< (current-column) (current-indentation))
+ (forward-to-indentation 0))))
(defun yaml-electric-backspace (arg)
"Delete characters or back-dent the current line.
@@ -392,8 +395,8 @@ margin."
(self-insert-command (prefix-numeric-value arg))
(save-excursion
(beginning-of-line)
- (if (and (not arg) (looking-at yaml-document-delimiter-re))
- (delete-horizontal-space))))
+ (when (and (not arg) (looking-at yaml-document-delimiter-re))
+ (delete-horizontal-space))))
(defun yaml-narrow-to-block-literal ()
"Narrow the buffer to block literal if the point is in it,
@@ -411,13 +414,13 @@ otherwise do nothing."
(/= min-level 0)
(not (looking-at-p yaml-block-literal-re))
(not (bobp)))
- (set 'nlines (1- nlines))
+ (setq nlines (1- nlines))
(unless (looking-at-p yaml-blank-line-re)
- (set 'min-level (min min-level (current-indentation))))
+ (setq min-level (min min-level (current-indentation))))
(forward-line -1))
(when (and (< (current-indentation) min-level)
- (looking-at-p yaml-block-literal-re))
- (set 'min-level (current-indentation))
+ (looking-at-p yaml-block-literal-re))
+ (setq min-level (current-indentation))
(forward-line)
(setq beg (point))
(while (and (not (eobp))
- [nongnu] elpa/yaml-mode f297efe 012/124: YAML imenu outline integration, (continued)
- [nongnu] elpa/yaml-mode f297efe 012/124: YAML imenu outline integration, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 2c0359f 004/124: change VERSION, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 18c9135 020/124: replace `last-command-char` to `last-command-event`, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode ef3546b 047/124: allow spaces before '-' in yaml-scalar-context-re, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode bdc47a4 056/124: added two more test files, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 236832c 068/124: Merge branch 'liangfu-master', ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode f378589 079/124: Merge pull request #45 from dunn/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode f991710 086/124: Support for apostrophe in words, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode b83482e 089/124: Support double quote in implicit keys, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode df66d7f 091/124: Merge pull request #59 from Kaali/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode fc7bac0 092/124: Formatting fixes,
ELPA Syncer <=
- [nongnu] elpa/yaml-mode 2522b3c 101/124: Fix typos, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 8105718 105/124: Simplify the implementation; move a comment, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode add6156 113/124: yaml-mode-syntax-propertize-function: Clear ppss cache, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode bce5aa1 011/124: changed version and added Changes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 9d5a888 025/124: Merge pull request #6 from gvalkov/yaml-file-type, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode a87ab36 046/124: add RECRUITMENTS, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode dcdcd81 049/124: Add myself as maintainer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 6ddd552 058/124: Merge pull request #34 from antalk2/again-p2, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 75c8f36 064/124: Unhighlight foo#bar tokens, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 1cff904 067/124: fix regex in adding yaml-mode to auto-mode-alist, ELPA Syncer, 2021/08/29