css-mode (0.11-7) css-mode.el

Summary

 css-mode.el |   88 ++++++++++++++++++++++++++++++++++++------------------------
 1 file changed, 53 insertions(+), 35 deletions(-)

    
download this patch

Patch contents

--- css-mode-0.11.orig/css-mode.el
+++ css-mode-0.11/css-mode.el
@@ -4,10 +4,11 @@
 ;;; Adds font locking, some rather primitive indentation handling and
 ;;; some typing help.
 ;;;
-(defvar cssm-version "0.11"
+(defvar cssm-version "0.11.zap1"
   "The current version number of css-mode.")
 ;;; copyright (c) 1998 Lars Marius Garshol, larsga@ifi.uio.no
 ;;; $Id: css-mode.el,v 1.9 2000/01/05 21:21:56 larsga Exp $
+;;; Modified by John Zaitseff, 3rd November 2004.
 
 ;;; css-mode is free software; you can redistribute it and/or modify
 ;;; it under the terms of the GNU General Public License as published
@@ -64,7 +65,7 @@
 
 ; Customizable variables:
 
-(defvar cssm-indent-level 2 "The indentation level inside @media rules.")
+(defvar cssm-indent-level 2 "The indentation level inside rules.")
 (defvar cssm-mirror-mode t
   "Whether brackets, quotes etc should be mirrored automatically on
   insertion.")
@@ -73,39 +74,51 @@
 closing bracket or not.")
 (defvar cssm-indent-function #'cssm-old-style-indenter
   "Which function to use when deciding which column to indent to. To get
-C-style indentation, use cssm-c-style-indenter.")
-  
+C-style indentation, use cssm-c-style-indenter. To get old-style indentation,
+use cssm-old-style-indenter.")
+
 ; The rest of the code:
 
 (defvar cssm-properties
-  '("font-family" "font-style" "font-variant" "font-weight"
-    "font-size" "font" "background-color" "background-image"
-    "background-repeat" "background-attachment" "background-position"
-    "color" "background" "word-spacing" "letter-spacing"
+  '("font-family" "font-style" "font-variant" "font-weight" "font-size"
+    "font" "background-color" "background-image" "background-repeat"
+    "background-attachment" "background-position" "background" "color"
+    "word-spacing" "letter-spacing" "text-decoration" "vertical-align"
+    "text-transform" "text-align" "text-indent" "line-height" "margin-top"
+    "margin-right" "margin-bottom" "margin-left" "margin" "padding-top"
+    "padding-right" "padding-bottom" "padding-left" "padding"
     "border-top-width" "border-right-width" "border-left-width"
-    "border-bottom-width" "border-width" "list-style-type"
-    "list-style-image" "list-style-position" "text-decoration"
-    "vertical-align" "text-transform" "text-align" "text-indent"
-    "line-height" "margin-top" "margin-right" "margin-bottom"
-    "margin-left" "margin" "padding-top" "padding-right" "padding-bottom"
-    "padding-left" "padding" "border-top" "border-right" "border-bottom"
-    "border-left" "border" "width" "height" "float" "clear" "display"
-    "list-style" "white-space" "border-style" "border-color"
-
-    ; CSS level 2:
-
-    "azimuth" "border-bottom-color" "border-bottom-style"
-    "border-collapse" "border-left-color" "border-left-style"
-    "border-right-color" "border-right-style" "border-top-color"
-    "border-top-style" "caption-side" "cell-spacing" "clip" "column-span"
-    "content" "cue" "cue-after" "cue-before" "cursor" "direction"
-    "elevation" "font-size-adjust" "left" "marks" "max-height" "max-width"
-    "min-height" "min-width" "orphans" "overflow" "page-break-after"
-    "page-break-before" "pause" "pause-after" "pause-before" "pitch"
-    "pitch-range" "play-during" "position" "richness" "right" "row-span"
-    "size" "speak" "speak-date" "speak-header" "speak-punctuation"
-    "speak-time" "speech-rate" "stress" "table-layout" "text-shadow" "top"
-    "visibility" "voice-family" "volume" "widows" "z-index")
+    "border-bottom-width" "border-width" "border-color" "border-style"
+    "border-top" "border-right" "border-bottom" "border-left" "border"
+    "width" "height" "float" "clear" "display" "white-space"
+    "list-style-type" "list-style-image" "list-style-position"
+    "list-style"
+
+    ; CSS level 2.1:
+
+    "border-bottom-color" "border-bottom-style" "border-collapse"
+    "border-left-color" "border-left-style" "border-right-color"
+    "border-right-style" "border-spacing" "border-top-color"
+    "border-top-style" "bottom" "caption-side" "clip" "content"
+    "counter-increment" "counter-reset" "cursor" "direction" "empty-cells"
+    "left" "max-height" "max-width" "min-height" "min-width" "orphans"
+    "outline" "outline-color" "outline-style" "outline-width" "overflow"
+    "page-break-after" "page-break-before" "page-break-inside" "position"
+    "quotes" "right" "table-layout" "top" "unicode-bidi" "visibility"
+    "widows" "z-index"
+
+    ; CSS level 2 (dropped from 2.1):
+
+    "azimuth" "cue" "cue-after" "cue-before" "elevation"
+    "font-size-adjust" "font-stretch" "marker-offset" "marks" "page"
+    "pause" "pause-after" "pause-before" "pitch" "pitch-range"
+    "play-during" "richness" "size" "speak" "speak-header" "speak-numeral"
+    "speak-punctuation" "speech-rate" "stress" "text-shadow"
+    "voice-family" "volume"
+
+    ; Non-standard properties
+
+    "cell-spacing" "column-span" "row-span" "speak-date" "speak-time")
   "A list of all CSS properties.")
 
 (defvar cssm-properties-alist
@@ -128,7 +141,7 @@
   '("link" "visited" "active" "first-line" "first-letter"
 
     ; CSS level 2
-    "first-child" "before" "after" "hover")
+    "first-child" "before" "after" "hover" "focus" "lang")
   "A list of all CSS pseudo-classes.")
 
 ; internal
@@ -327,8 +340,13 @@
 
 (define-skeleton cssm-insert-curlies
   "Inserts a pair of matching curly parenthesises." nil
-  "{ " _ (if cssm-newline-before-closing-bracket "\n" " ")
-  "}")
+  "{"
+  (if cssm-newline-before-closing-bracket "\n" " ")
+  (if cssm-newline-before-closing-bracket '>)
+  _
+  (if cssm-newline-before-closing-bracket "\n" " ")
+  "}"
+  (if cssm-newline-before-closing-bracket '>))
 
 (define-skeleton cssm-insert-quotes
   "Inserts a pair of matching quotes." nil
@@ -467,4 +485,4 @@
 
 (provide 'css-mode)
 
-;; CSS-mode ends here
\ No newline at end of file
+;; CSS-mode ends here