Files
emacsd/elpa/company-20191029.2116/company-css.elc

47 lines
16 KiB
Plaintext
Raw Normal View History

;ELC
;;; Compiled
;;; in Emacs version 26.3
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(byte-code "\300\301!\210\300\302!\207" [require company cl-lib] 2)
#@53 A list of CSS properties and their possible values.
(defconst company-css-property-alist '(("azimuth" angle "left-side" "far-left" "left" "center-left" "center" "center-right" "right" "far-right" "right-side" "behind" "leftwards" "rightwards") ("background" background-color background-image background-repeat background-attachment background-position background-clip background-origin background-size) ("background-attachment" "scroll" "fixed") ("background-color" color "transparent") ("background-image" uri "none") ("background-position" percentage length "left" "center" "right" percentage length "top" "center" "bottom" "left" "center" "right" "top" "center" "bottom") ("background-repeat" "repeat" "repeat-x" "repeat-y" "no-repeat") ("border" border-width border-style border-color) ("border-bottom" border) ("border-bottom-color" border-color) ("border-bottom-style" border-style) ("border-bottom-width" border-width) ("border-collapse" "collapse" "separate") ("border-color" color "transparent") ("border-left" border) ("border-left-color" border-color) ("border-left-style" border-style) ("border-left-width" border-width) ("border-right" border) ("border-right-color" border-color) ("border-right-style" border-style) ("border-right-width" border-width) ("border-spacing" length length) ("border-style" border-style) ("border-top" border) ("border-top-color" border-color) ("border-top-style" border-style) ("border-top-width" border-width) ("border-width" border-width) ("bottom" length percentage "auto") ("caption-side" "top" "bottom") ("clear" "none" "left" "right" "both") ("clip" shape "auto") ("color" color) ("content" "normal" "none" string uri counter "attr()" "open-quote" "close-quote" "no-open-quote" "no-close-quote") ("counter-increment" identifier integer "none") ("counter-reset" identifier integer "none") ("cue" cue-before cue-after) ("cue-after" uri "none") ("cue-before" uri "none") ("cursor" uri "*" "auto" "crosshair" "default" "pointer" "move" "e-resize" "ne-resize" "nw-resize" "n-resize" "se-resize" "sw-resize" "s-resize" "w-resize" "text" "wait" "help" "progress") ("direction" "ltr" "rtl") ("display" "inline" "block" "list-item" "run-in" "inline-block" "table" "inline-table" "table-row-group" "table-header-group" "table-footer-group" "table-row" "table-column-group" "table-column" "table-cell" "table-caption" "none") ("elevation" angle "below" "level" "above" "higher" "lower") ("empty-cells" "show" "hide") ("float" "left" "right" "none") ("font" font-style font-weight font-size "/" line-height font-family "caption" "icon" "menu" "message-box" "small-caption" "status-bar" "normal" "small-caps" font-stretch) ("font-family" family-name generic-family) ("font-size" absolute-size relative-size length percentage) ("font-style" "normal" "italic" "oblique") ("font-weight" "normal" "bold" "bolder" "lighter" "100" "200" "300" "400" "500" "600" "700" "800" "900") ("height" length percentage "auto") ("left" length percentage "auto") ("letter-spacing" "normal" length) ("line-height" "normal" number length percentage) ("list-style" list-style-type list-style-position list-style-image) ("list-style-image" uri "none") ("list-style-position" "inside" "outside") ("list-style-type" "disc" "circle" "square" "decimal" "decimal-leading-zero" "lower-roman" "upper-roman" "lower-greek" "lower-latin" "upper-latin" "armenian" "georgian" "lower-alpha" "upper-alpha" "none") ("margin" margin-width) ("margin-bottom" margin-width) ("margin-left" margin-width) ("margin-right" margin-width) ("margin-top" margin-width) ("max-height" length percentage "none") ("max-width" length percentage "none") ("min-height" length percentage) ("min-width" length percentage) ("orphans" integer) ("outline" outline-color outline-style outline-width) ("outline-color" color "invert") ("outline-style" border-style) ("outline-width" border-width) ("overflow" "visible" "hidden" "scroll" "auto" "no-display" "no-content") ("padding" padding-width) ("padding-bottom" padding-width) ("padding-left" padding-width) ("padding-right" padding-width) ("padding-top" padding-width) ("page-break-after" "auto" "always" "avoid" "left" "rig
#@58 A list of CSS property value classes and their contents.
(defconst company-css-value-classes '((absolute-size "xx-small" "x-small" "small" "medium" "large" "x-large" "xx-large") (align-common "flex-start" "flex-end" "center") (align-stretch align-common "stretch") (border-style "none" "hidden" "dotted" "dashed" "solid" "double" "groove" "ridge" "inset" "outset") (border-width "thick" "medium" "thin") (color "aqua" "black" "blue" "fuchsia" "gray" "green" "lime" "maroon" "navy" "olive" "orange" "purple" "red" "silver" "teal" "white" "yellow") (counter "counter(,)") (family-name "Courier" "Helvetica" "Times") (generic-family "serif" "sans-serif" "cursive" "fantasy" "monospace") (generic-voice "male" "female" "child") (margin-width "auto") (relative-size "larger" "smaller") (shape "rect(,,,)") (uri "url()")) (#$ . 11637))
#@48 A list of HTML tags for use in CSS completion.
(defconst company-css-html-tags '("a" "abbr" "acronym" "address" "applet" "area" "b" "base" "basefont" "bdo" "big" "blockquote" "body" "br" "button" "caption" "center" "cite" "code" "col" "colgroup" "dd" "del" "dfn" "dir" "div" "dl" "dt" "em" "fieldset" "font" "form" "frame" "frameset" "h1" "h2" "h3" "h4" "h5" "h6" "head" "hr" "html" "i" "iframe" "img" "input" "ins" "isindex" "kbd" "label" "legend" "li" "link" "map" "menu" "meta" "noframes" "noscript" "object" "ol" "optgroup" "option" "p" "param" "pre" "q" "s" "samp" "script" "select" "small" "span" "strike" "strong" "style" "sub" "sup" "table" "tbody" "td" "textarea" "tfoot" "th" "thead" "title" "tr" "tt" "u" "ul" "var" "section" "article" "aside" "header" "footer" "nav" "figure" "figcaption" "time" "mark" "main") (#$ . 12473))
#@57 Identifiers for CSS pseudo-elements and pseudo-classes.
(defconst company-css-pseudo-classes '("active" "after" "before" "first" "first-child" "first-letter" "first-line" "focus" "hover" "lang" "left" "link" "right" "visited") (#$ . 13316))
(defconst company-css-property-cache (make-hash-table :size 115 :test 'equal))
#@79 Access the `company-css-property-alist' cached and flattened.
(fn ATTRIBUTE)
(defalias 'company-css-property-values #[257 "\303\"\206e\304\305 \"A\211\203G\211@\2119\203;\305\n\"A\206%\306\307!!\211\2037\211@\211B\262A\266\202\202%\210\202@\211B\262A\266\202\202 \210\310\311\"\262\312\313\314!\203\\\314!\202_\315!#\210\211\262\207" [company-css-property-cache company-css-property-alist company-css-value-classes gethash nil assoc company-css-property-values symbol-name sort string< puthash fboundp delete-consecutive-dups delete-dups] 8 (#$ . 13642)])
#@45 A syntax table giving { and } paren syntax.
(defconst company-css-braces-syntax-table (byte-code "\300 \211\211\301\302I\266\211\211\303\304I\266\211\207" [make-syntax-table 123 (4 . 125) 125 (5 . 123)] 5) (#$ . 14233))
#@53 Return non-nil, if point is within matched { and }.
(defalias 'company-css-inside-braces-p #[0 "\3021&\303 p\304\305\306\307\310\"\311\"\312$\216\313!\210\314\315`\316\317#*\266\2020\207\210\320\207" [company-css-braces-syntax-table parse-sexp-ignore-comments (error) syntax-table make-byte-code 0 "r\301q\210\302\300!)\207" vconcat vector [set-syntax-table] 2 set-syntax-table t scan-lists -1 1 nil] 9 (#$ . 14461)])
#@41 A regular expression matching CSS tags.
(defconst company-css-tag-regexp "\\(?:\\`\\|}\\)[[:space:]]*\\(?:\\(?:#\\|\\_<[[:alpha:]]\\)[[:alnum:]-#]*\\(?:\\[[^]]*\\]\\)?\\(?:[[:space:]]+\\|[[:space:]]*[+,>][[:space:]]*\\)\\)*\\(\\(?:#\\|\\_<[[:alpha:]]\\)\\(?:[[:alnum:]-#]*\\_>\\)?\\_>\\|\\)\\=" (#$ . 14892))
#@51 A regular expression matching CSS pseudo classes.
(defconst company-css-pseudo-regexp "\\(?:\\`\\|}\\)[[:space:]]*\\(?:\\(?:#\\|\\_<[[:alpha:]]\\)[[:alnum:]-#]*\\(?:\\[[^]]*\\]\\)?\\(?:[[:space:]]+\\|[[:space:]]*[+,>][[:space:]]*\\)\\)*\\(?:\\(?:\\#\\|\\_<[[:alpha:]]\\)[[:alnum:]-#]*\\):\\([[:alpha:]-]+\\_>\\|\\)\\_>\\=" (#$ . 15207))
#@111 Return the CSS property before point, if any.
Returns "" if no property found, but feasible at this position.
(defalias 'company-css-grab-property #[0 "\300 \205\301 \207" [company-css-inside-braces-p company-grab-symbol] 1 (#$ . 15551)])
#@41 A regular expression matching CSS tags.
(defconst company-css-property-value-regexp "\\_<\\([[:alpha:]-]+\\):\\(?:[^{};]*[[:space:]]+\\)?\\([^{};]*\\_>\\|\\)\\=" (#$ . 15798))
#@93 `company-mode' completion backend for `css-mode'.
(fn COMMAND &optional ARG &rest IGNORED)
(defalias 'company-css #[641 "\306\307\"\203 \310\311!\207\306\312\"\203?\313\314!\204%\313\315!\205\203\316 \317\230\205\203\320\321\"\206>\320 \321\"\206>\320\n\322\323 #\206>\324 \207\306\325\"\203{\320\321\"\203R\326 \"\207\320 \321\"\203^\326\f\"\207\320\n\322\323 #\203q\326\327\320\n\321\"!\"\207\324 \205\203\326 \"\207\306\330\"\205\203\331\207" [company-css-tag-regexp company-css-pseudo-regexp company-css-property-value-regexp company-css-html-tags company-css-pseudo-classes company-css-property-alist eql interactive company-begin-backend company-css prefix derived-mode-p css-mode web-mode web-mode-language-at-pos "css" company-grab 1 2 line-beginning-position company-css-grab-property candidates all-completions company-css-property-values sorted t] 9 (#$ . 15980) (byte-code "\300C\207" [interactive] 1)])
(provide 'company-css)