From 07d1318926f05efe53e610bb35879263368c4b61 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 9 Nov 2019 19:34:59 -0500 Subject: [PATCH] mode-hooks: update css-mode hook for emacs' upstream implementation. --- mode-hooks/css-mode-hooks.el | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/mode-hooks/css-mode-hooks.el b/mode-hooks/css-mode-hooks.el index de053f8..ea0247f 100644 --- a/mode-hooks/css-mode-hooks.el +++ b/mode-hooks/css-mode-hooks.el @@ -1,36 +1,6 @@ -(defun cssm-right-brace-macro() - (interactive) - (cssm-insert-right-brace-and-indent) - (forward-char) - ) - - (defun cssm-hook() - - (cssm-leave-mirror-mode) - (setq cssm-indent-function 'cssm-c-style-indenter) - - (define-key cssm-mode-map (read-kbd-macro "}") 'cssm-right-brace-macro) - - ;; Add "focus" to the list of pseudo-selectors - (add-to-list 'cssm-pseudos "focus") - - ;; Redefine the CSS regular expressions to allow underscores - (setq cssm-font-lock-keywords - (list - (cons (cssm-list-2-regexp cssm-keywords) font-lock-keyword-face) - (cons "\\.[a-zA-Z][-a-zA-Z_0-9.]+" font-lock-variable-name-face) - (cons (concat ":" (cssm-list-2-regexp cssm-pseudos)) - font-lock-variable-name-face) - (cons "#[a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\)?" - font-lock-reference-face) - (cons "\\[.*\\]" font-lock-variable-name-face) - (cons "#[-a-zA-Z_0-9]*" font-lock-function-name-face) - (cons "rgb(\\s-*[0-9]+\\(\\.[0-9]+\\s-*%\\s-*\\)?\\s-*,\\s-*[0-9]+\\(\\.[0-9]+\\s-*%\\s-*\\)?\\s-*,\\s-*[0-9]+\\(\\.[0-9]+\\s-*%\\s-*\\)?\\s-*)" - font-lock-reference-face) - ) - ) - ) + (setq css-indent-offset 2) +) (add-hook 'css-mode-hook (function cssm-hook)) -- 2.44.2