aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2007-09-15 20:45:41 +0000
committerGlenn Morris2007-09-15 20:45:41 +0000
commit96736d92c6b22cbdaa1192e48f6968a045b319ce (patch)
tree8de25b7a4d68fe923031b066b19c5d16607cadbb
parent3c8e09dc2a51b570fac3b1b454572ccaee890e25 (diff)
downloademacs-96736d92c6b22cbdaa1192e48f6968a045b319ce.tar.gz
emacs-96736d92c6b22cbdaa1192e48f6968a045b319ce.zip
(css): New custom group.
(css-electrick-keys, css-selector, css-property) (css-indent-offset): Specify custom group.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/textmodes/css-mode.el16
2 files changed, 19 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f610e1eaace..ec8d271ae32 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,13 @@
3 * calendar/holidays.el (holiday-list): Rename it back to 3 * calendar/holidays.el (holiday-list): Rename it back to
4 `list-holidays', but leave `holiday-list' as an alias. 4 `list-holidays', but leave `holiday-list' as an alias.
5 5
6 * textmodes/bibtex-style.el (bibtex-style-indent-basic): Specify a
7 custom group.
8
9 * textmodes/css-mode.el (css): New custom group.
10 (css-electrick-keys, css-selector, css-property)
11 (css-indent-offset): Specify custom group.
12
62007-09-15 Stefan Monnier <monnier@iro.umontreal.ca> 132007-09-15 Stefan Monnier <monnier@iro.umontreal.ca>
7 14
8 * pcvs.el (cvs-tags-list, cvs-retrieve-revision, cvs-find-modif) 15 * pcvs.el (cvs-tags-list, cvs-retrieve-revision, cvs-find-modif)
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index b00fc356cce..e90fa615039 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -33,6 +33,10 @@
33 33
34;;; Code: 34;;; Code:
35 35
36(defgroup css nil
37 "Cascading Style Sheets (CSS) editing mode."
38 :group 'languages)
39
36(defun css-extract-keyword-list (res) 40(defun css-extract-keyword-list (res)
37 (with-temp-buffer 41 (with-temp-buffer
38 (url-insert-file-contents "http://www.w3.org/TR/REC-CSS2/css2.txt") 42 (url-insert-file-contents "http://www.w3.org/TR/REC-CSS2/css2.txt")
@@ -172,7 +176,8 @@
172(defcustom css-electrick-keys '(?\} ?\;) ;; '() 176(defcustom css-electrick-keys '(?\} ?\;) ;; '()
173 "Self inserting keys which should trigger re-indentation." 177 "Self inserting keys which should trigger re-indentation."
174 :type '(repeat character) 178 :type '(repeat character)
175 :options '((?\} ?\;))) 179 :options '((?\} ?\;))
180 :group 'css)
176 181
177(defvar css-mode-syntax-table 182(defvar css-mode-syntax-table
178 (let ((st (make-syntax-table))) 183 (let ((st (make-syntax-table)))
@@ -207,9 +212,11 @@
207(defconst css-name-re (concat css-nmchar-re "+")) 212(defconst css-name-re (concat css-nmchar-re "+"))
208 213
209(defface css-selector '((t :inherit font-lock-function-name-face)) 214(defface css-selector '((t :inherit font-lock-function-name-face))
210 "Face to use for selectors.") 215 "Face to use for selectors."
216 :group 'css)
211(defface css-property '((t :inherit font-lock-variable-name-face)) 217(defface css-property '((t :inherit font-lock-variable-name-face))
212 "Face to use for properties.") 218 "Face to use for properties."
219 :group 'css)
213 220
214(defvar css-font-lock-keywords 221(defvar css-font-lock-keywords
215 `(("!\\s-*important" . font-lock-builtin-face) 222 `(("!\\s-*important" . font-lock-builtin-face)
@@ -390,7 +397,8 @@
390 397
391(defcustom css-indent-offset 4 398(defcustom css-indent-offset 4
392 "Basic size of one indentation step." 399 "Basic size of one indentation step."
393 :type 'integer) 400 :type 'integer
401 :group 'css)
394 402
395(defun css-indent-calculate () 403(defun css-indent-calculate ()
396 (let ((ppss (syntax-ppss)) 404 (let ((ppss (syntax-ppss))