[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 53f9042 100/496: Rename swift-mode--font-lock-d
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 53f9042 100/496: Rename swift-mode--font-lock-defaults to swift-font-lock-keywords and |
Date: |
Sun, 29 Aug 2021 11:33:16 -0400 (EDT) |
branch: elpa/swift-mode
commit 53f90428e9258dd649e6550bf5b0451ea1b2a2bc
Author: ap4y <lod@pisem.net>
Commit: ap4y <lod@pisem.net>
Rename swift-mode--font-lock-defaults to swift-font-lock-keywords and
compose list using list quote
---
swift-mode.el | 64 +++++++++++++++++++++++++++++------------------------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/swift-mode.el b/swift-mode.el
index d0b4caf..e3e49a4 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -261,71 +261,70 @@
(defvar swift-mode--constants
'("true" "false" "nil"))
-(defvar swift-mode--font-lock-defaults
- (list
- (list
-
+(defvar swift-font-lock-keywords
+ `(
;; Keywords
;;
;; Swift allows reserved words to be used as identifiers when enclosed
;; with backticks, in which case they should be highlighted as
;; identifiers, not keywords.
- (cons (rx-to-string
- `(and (or bol (not (any "`"))) bow
- (group (or ,@swift-mode--keywords))
- eow)
- t)
- 1)
+ (,(rx-to-string
+ `(and (or bol (not (any "`"))) bow
+ (group (or ,@swift-mode--keywords))
+ eow)
+ t)
+ 1 font-lock-keyword-face)
;; Types
;;
;; Any token beginning with an uppercase character is highlighted as a
;; type.
- (cons (rx bow upper (* word) eow)
- font-lock-type-face)
+ (,(rx bow upper (* word) eow)
+ 0 font-lock-type-face)
;; Function names
;;
;; Any token beginning after `func' is highlighted as a function name.
- (cons (rx bow "func" eow (+ space) (group bow (+ word) eow))
- (list 1 font-lock-function-name-face))
+ (,(rx bow "func" eow (+ space) (group bow (+ word) eow))
+ 1 font-lock-function-name-face)
;; Value bindings
;;
;; Any token beginning after `let' or `var' is highlighted as an
;; identifier.
- (cons (rx-to-string `(and bow
- (or ,@swift-mode--val-decl-keywords)
- eow
- (+ space)
- (? "(")
- (group (+ (or (+ (? ?`) word (? ?`)) ?, space)))
- (? ")"))
- t)
- (list 1 font-lock-variable-name-face))
+ (,(rx-to-string `(and bow
+ (or ,@swift-mode--val-decl-keywords)
+ eow
+ (+ space)
+ (? "(")
+ (group (+ (or (+ (? ?`) word (? ?`)) ?, space)))
+ (? ")"))
+ t)
+ 1 font-lock-variable-name-face)
;; Use high-visibility face for pattern match wildcards.
- (cons (rx (not (any word digit)) (group "_") (or eol (not (any word
digit))))
- (list 1 font-lock-negation-char-face))
+ (,(rx (not (any word digit)) (group "_") (or eol (not (any word digit))))
+ 1 font-lock-negation-char-face)
;; Constants
;;
;; Highlight nil and boolean literals.
- (cons (rx-to-string `(and bow (or ,@swift-mode--constants) eow))
- font-lock-constant-face)
+ (,(rx-to-string `(and bow (or ,@swift-mode--constants) eow))
+ 0 font-lock-constant-face)
;; Attributes
;;
;; Use string face for attribute name.
- (cons (rx (or bol space)(group "@" (+ word)) eow)
- (list 1 font-lock-string-face))
+ (,(rx (or bol space)(group "@" (+ word)) eow)
+ 1 font-lock-string-face)
;; Imported modules
;;
;; Highlight the names of imported modules. Use `font-lock-string-face' for
;; consistency with C modes.
- (cons (rx bow "import" eow (+ space) (group (+ word)))
- (list 1 font-lock-string-face)))))
+ (,(rx bow "import" eow (+ space) (group (+ word)))
+ 1 font-lock-string-face)
+ ))
;;; Imenu
@@ -495,7 +494,8 @@ You can send text to the REPL process from other buffers
containing source.
\\<swift-mode-map>"
:group 'swift
:syntax-table swift-mode-syntax-table
- (setq-local font-lock-defaults swift-mode--font-lock-defaults)
+ (setq font-lock-defaults '((swift-font-lock-keywords) nil nil))
+
(setq-local imenu-generic-expression swift-mode--imenu-generic-expression)
(setq-local comment-start "// ")
- [nongnu] elpa/swift-mode 5074a02 480/496: Fix font-lock of successive identifiers, (continued)
- [nongnu] elpa/swift-mode 5074a02 480/496: Fix font-lock of successive identifiers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 2293e78 481/496: Fix indentation of throws without result type, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 19c956c 482/496: Fix GitHub Action, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 95ff004 479/496: Fix indentation of closures inside condition-list, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode db3603a 489/496: Highlight async/await, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 4a5f577 488/496: Tweak comments and style, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 86043c2 093/496: Define electric-indent characters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b298842 094/496: Merge pull request #26 from ap4y/electric_indent, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 027522d 090/496: Merge pull request #23 from ap4y/flycheck_improvements, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 20e4ecf 099/496: Merge pull request #27 from ap4y/highlight_declaration_with_destructuring, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 53f9042 100/496: Rename swift-mode--font-lock-defaults to swift-font-lock-keywords and,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 72eb603 105/496: Use semver friendly version number, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 021f0ab 104/496: Remove flycheck code from .dir-locals.el as not everyone has flycheck installed, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0c734dd 112/496: Indent multiline hash and array syntax same way as Xcode does, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 699e896 106/496: Start work on the 0.2 series, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 07f6434 111/496: Fix indentation issues with type annotations, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode abd6e07 130/496: Merge pull request #39 from ap4y/fix_37, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c664fc2 144/496: Merge pull request #51 from ap4y/fix_default_case_indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ce72472 141/496: Make all possible operators allowed in string interpolation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 3298fb1 169/496: Stop overriding user preferences for tab-width., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0808a2b 170/496: Add font-lock rules for access modifier keywords, ELPA Syncer, 2021/08/29