mirror of
https://codeberg.org/scip/config-general-mode.git
synced 2025-12-17 20:40:57 +01:00
set default font config-general-value-face for all non-matching chars
This commit is contained in:
@@ -178,6 +178,11 @@
|
|||||||
"face for strings"
|
"face for strings"
|
||||||
:group 'config-general-faces)
|
:group 'config-general-faces)
|
||||||
|
|
||||||
|
(defface config-general-value-face
|
||||||
|
'((t (:foreground "DarkSlateGrey")))
|
||||||
|
"face for variable values"
|
||||||
|
:group 'config-general-faces)
|
||||||
|
|
||||||
|
|
||||||
;;;; Global Vars
|
;;;; Global Vars
|
||||||
(defconst config-general-mode-version "0.01" "Config::General mode version")
|
(defconst config-general-mode-version "0.01" "Config::General mode version")
|
||||||
@@ -433,7 +438,7 @@ string). It returns t if a new expansion is found, nil otherwise."
|
|||||||
;; variable definitions
|
;; variable definitions
|
||||||
;; FIXME: add support for -SplitPolicy and -SplitDelimiter and make
|
;; FIXME: add support for -SplitPolicy and -SplitDelimiter and make
|
||||||
;; the = a customizable variable, if possible
|
;; the = a customizable variable, if possible
|
||||||
("^[ \t]*\\(.+?\\)[ \t]*="
|
("^[ \t]*\\(.+?\\)[ \t]*=\\(.*\\)"
|
||||||
(1 'config-general-variable-name-face))
|
(1 'config-general-variable-name-face))
|
||||||
|
|
||||||
;; interpolating variables
|
;; interpolating variables
|
||||||
@@ -443,9 +448,15 @@ string). It returns t if a new expansion is found, nil otherwise."
|
|||||||
;; escape char
|
;; escape char
|
||||||
("\\(\\\\\\)" (1 'config-general-escape-char-face))
|
("\\(\\\\\\)" (1 'config-general-escape-char-face))
|
||||||
))
|
))
|
||||||
|
|
||||||
|
;; activate
|
||||||
(set (make-local-variable 'font-lock-defaults)
|
(set (make-local-variable 'font-lock-defaults)
|
||||||
'(config-general-font-lock-keywords nil nil nil nil))
|
'(config-general-font-lock-keywords nil nil nil nil))
|
||||||
(font-lock-mode 1))
|
(font-lock-mode 1)
|
||||||
|
|
||||||
|
;; set default font for everything else, which can only be variable values
|
||||||
|
(setq buffer-face-mode-face 'config-general-value-face)
|
||||||
|
(buffer-face-mode))
|
||||||
|
|
||||||
(defun config-general--init-minors ()
|
(defun config-general--init-minors ()
|
||||||
;; from shell-script-mode, turn << into here-doc
|
;; from shell-script-mode, turn << into here-doc
|
||||||
|
|||||||
Reference in New Issue
Block a user