branch: elpa/swift-mode commit cb6186e4b180317d98cc83ab5d6c55914b0ac222 Author: Daniel MartÃn <mardan...@yahoo.es> Commit: taku0 <ta...@users.noreply.github.com>
Add support for font-lock-negation-char-face Emacs can show negation characters using a specific face in font-lock. This commit adds support for it in swift-mode. --- swift-mode-font-lock.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/swift-mode-font-lock.el b/swift-mode-font-lock.el index 398cfed..da32425 100644 --- a/swift-mode-font-lock.el +++ b/swift-mode-font-lock.el @@ -138,6 +138,10 @@ Example: #if, #endif, and #selector." "Face for highlighting property accesses." :group 'swift-mode:faces) +(defface swift-mode:negation-char-face + '((t . (:inherit font-lock-negation-char-face))) + "Face for highlighting the negation char." + :group 'swift-mode:faces) (defun swift-mode:make-set (list) "Return a hash where its keys are elements of the LIST. @@ -660,7 +664,12 @@ Excludes true, false, and keywords begin with a number sign.") ;; Property accesses (swift-mode:font-lock-match-property-access . - 'swift-mode:property-access-face)) + 'swift-mode:property-access-face) + + ;; Make negation chars easier to see + ("\\(?:^\\|[^[:alnum:]_]\\)\\(!+\\)[^=]" + 1 + 'swift-mode:negation-char-face)) "Swift mode keywords for Font Lock.")