[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/yaml-mode 7f41037 087/124: Merge pull request #57 from Kaa
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/yaml-mode 7f41037 087/124: Merge pull request #57 from Kaali/master |
Date: |
Sun, 29 Aug 2021 11:36:18 -0400 (EDT) |
branch: elpa/yaml-mode
commit 7f4103736178fc6e3a9a9ba3b3d0516986ab8b71
Merge: 28c3403 f991710
Author: Vasilij Schneidermann <mail@vasilij.de>
Commit: GitHub <noreply@github.com>
Merge pull request #57 from Kaali/master
Support for apostrophe in words
---
yaml-mode.el | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/yaml-mode.el b/yaml-mode.el
index e257379..00f0c2d 100644
--- a/yaml-mode.el
+++ b/yaml-mode.el
@@ -245,7 +245,8 @@ that key is pressed to begin a block literal."
"Additional expressions to highlight in YAML mode.")
(defun yaml-mode-syntax-propertize-function (beg end)
- "Unhighlight foo#bar tokens between BEG and END."
+ "Override buffer's syntax table for special syntactic constructs."
+ ;; Unhighlight foo#bar tokens between BEG and END.
(save-excursion
(goto-char beg)
(while (search-forward "#" end t)
@@ -255,7 +256,20 @@ that key is pressed to begin a block literal."
(when (and (not (bolp))
(not (memq (preceding-char) '(?\s ?\t))))
(put-text-property (point) (1+ (point))
- 'syntax-table (string-to-syntax "_")))))))
+ 'syntax-table (string-to-syntax "_"))))))
+
+ ;; If quote is detected as a syntactic string start but appeared
+ ;; after a non-whitespace character, then mark it as syntactic word.
+ (save-excursion
+ (goto-char beg)
+ (while (search-forward "'" end t)
+ (when (nth 8 (syntax-ppss))
+ (save-excursion
+ (forward-char -1)
+ (when (and (not (bolp))
+ (not (memq (preceding-char) '(?\s ?\t))))
+ (put-text-property (point) (1+ (point))
+ 'syntax-table (string-to-syntax "w"))))))))
(defun yaml-font-lock-block-literals (bound)
"Find lines within block literals.
- [nongnu] elpa/yaml-mode 85d5c63 050/124: allow dash-newline to start a sequence, (continued)
- [nongnu] elpa/yaml-mode 85d5c63 050/124: allow dash-newline to start a sequence, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 6590b19 060/124: add copy of GPLv2, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 4ae92a7 062/124: Define keymap and syntax table properly, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode c757396 066/124: Remove unnecessary refontification, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 44f73b6 017/124: Add autoload comments., ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 4c1127c 037/124: Improve paragraph filling of block literals, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode d88c80a 053/124: allow spaces before dash-newline, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 4e69e6e 059/124: update address for FSF, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode a4794ea 070/124: Mark non-negative integer values for indent safe, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 28c3403 085/124: Merge pull request #54 from jfrederickson/whitespace-document-separator, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 7f41037 087/124: Merge pull request #57 from Kaali/master,
ELPA Syncer <=
- [nongnu] elpa/yaml-mode 0aceaf3 100/124: Merge pull request #73 from tarsiiformes/typos, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 9e8362d 110/124: Merge pull request #76 from dgutov/spf-speedup, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 97d507f 048/124: Derive from text-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode f49fb81 123/124: Add magic-mode-list entry, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 6555018 003/124: Merged branch(TEST-MARSHALL-PATCH@17) to trunk, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 4ce371e 013/124: Removed version from README., ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 1fa61ec 016/124: Fixed bug for tabified indent., ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode b751113 021/124: Merge pull request #5 from sugyan/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode c2ac933 023/124: changed version, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode b15a8ff 028/124: fix anchor name can contain '_', ELPA Syncer, 2021/08/29