From: Michael Orlitzky Date: Sun, 10 Nov 2019 00:34:59 +0000 (-0500) Subject: mode-hooks: update css-mode hook for emacs' upstream implementation. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=07d1318926f05efe53e610bb35879263368c4b61;p=emacs.d.git mode-hooks: update css-mode hook for emacs' upstream implementation. --- 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))