[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/yaml-mode bc66879 038/124: Use the syntax table for highli
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/yaml-mode bc66879 038/124: Use the syntax table for highlighting comments. |
Date: |
Sun, 29 Aug 2021 11:36:08 -0400 (EDT) |
branch: elpa/yaml-mode
commit bc66879a9a9c2e0789ce1decfa185925c1f60a3f
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Wilfred Hughes <me@wilfred.me.uk>
Use the syntax table for highlighting comments.
Fixes https://github.com/yoshiki/yaml-mode/issues/19
---
yaml-mode.el | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/yaml-mode.el b/yaml-mode.el
index 33b059f..60b277b 100644
--- a/yaml-mode.el
+++ b/yaml-mode.el
@@ -120,9 +120,6 @@ that key is pressed to begin a block literal."
(defconst yaml-blank-line-re "^ *$"
"Regexp matching a line containing only (valid) whitespace.")
-(defconst yaml-comment-re "\\(?:^\\|\\s-+\\)\\(#.*\\)"
- "Regexp matching a line containing a YAML comment or delimiter.")
-
(defconst yaml-directive-re "^\\(?:--- \\)? *%\\(\\w+\\)"
"Regexp matching a line contatining a YAML directive.")
@@ -220,6 +217,7 @@ that key is pressed to begin a block literal."
"Simple mode to edit YAML.
\\{yaml-mode-map}"
+ :syntax-table yaml-mode-syntax-table
(set (make-local-variable 'comment-start) "# ")
(set (make-local-variable 'comment-start-skip) "#+ *")
(set (make-local-variable 'indent-line-function) 'yaml-indent-line)
@@ -227,26 +225,26 @@ that key is pressed to begin a block literal."
(set (make-local-variable 'font-lock-defaults)
'(yaml-font-lock-keywords
nil nil nil nil
- (font-lock-syntactic-keywords . yaml-font-lock-syntactic-keywords))))
+ (font-lock-syntactic-keywords . yaml-font-lock-syntactic-keywords)))
+ (font-lock-fontify-buffer))
;; Font-lock support
(defvar yaml-font-lock-keywords
(list
- (cons yaml-comment-re '(1 font-lock-comment-face))
(cons yaml-constant-scalars-re '(1 font-lock-constant-face))
(cons yaml-tag-re '(0 font-lock-type-face))
- (cons yaml-node-anchor-alias-re '(0 font-lock-function-name-face t))
- (cons yaml-hash-key-re '(1 font-lock-variable-name-face t))
+ (cons yaml-node-anchor-alias-re '(0 font-lock-function-name-face))
+ (cons yaml-hash-key-re '(1 font-lock-variable-name-face))
(cons yaml-document-delimiter-re '(0 font-lock-comment-face))
(cons yaml-directive-re '(1 font-lock-builtin-face))
- '(yaml-font-lock-block-literals 0 font-lock-string-face t)
+ '(yaml-font-lock-block-literals 0 font-lock-string-face)
'("^[\t]+" 0 'yaml-tab-face t))
"Additional expressions to highlight in YAML mode.")
(defvar yaml-font-lock-syntactic-keywords
- (list '(yaml-syntactic-block-literals 0 "." t))
+ (list '(yaml-syntactic-block-literals 0 "."))
"Additional syntax features to highlight in YAML mode.")
- [nongnu] elpa/yaml-mode 78b3ba5 095/124: fill while in a comment should behave as in text modes, (continued)
- [nongnu] elpa/yaml-mode 78b3ba5 095/124: fill while in a comment should behave as in text modes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 20d12a2 001/124: init, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 00ac9e5 116/124: Merge pull request #67 from HParker/fix-comment-indent, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 6694896 002/124: change e-mail, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 67348f3 014/124: dash (-) is a word character, see YAML spec 1.2 section 5.6, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 37469ca 015/124: Changed versions., ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode c7624d4 018/124: added *.elc to .gitignore, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 52d6d57 019/124: Merge pull request #3 from arthuraa/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 5eae0c1 031/124: Changed version to 0.0.9, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 5f92179 035/124: Merge pull request #15 from barrkel/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode bc66879 038/124: Use the syntax table for highlighting comments.,
ELPA Syncer <=
- [nongnu] elpa/yaml-mode 210b075 040/124: Bumping version to 0.0.11, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode c4fd940 072/124: Add *.raml to auto-mode-alist association, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 0189ca0 075/124: Map both DEL and <backspace> to electric backspace, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 2ace378 077/124: Bumping version to 0.0.13, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode ac21293 097/124: Fix indent after comment line, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode cecf4b1 102/124: Merge pull request #74 from DamienCassou/typos, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode e9696eb 106/124: Fix a thinko, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode e1aed40 107/124: Fix maintainer email, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode 00c2428 099/124: Fix typo, ELPA Syncer, 2021/08/29
- [nongnu] elpa/yaml-mode fc5e1c5 121/124: Bump version, summarize changes, ELPA Syncer, 2021/08/29