;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (defconst zencoding-mode:version "0.5.1") (require 'cl) #@67 Anaphoric if. Temporary variable `it' is the result of test-form. (defalias 'zencoding-aif '(macro . #[(test-form then-form &rest else-forms) "\303\304DC\305\304 \n\206 \306BBBE\207" [test-form then-form else-forms let it if (it)] 6 (#$ . 143)])) #@74 Parser anaphoric if. Temporary variable `it' is the result of test-form. (defalias 'zencoding-pif '(macro . #[(test-form then-form &rest else-forms) "\303\304DC\305\306 \n\206 \307BBBE\207" [test-form then-form else-forms let it if (not (eq 'error (car it))) (it)] 6 (#$ . 398)])) #@61 Parse according to a regex and update the `input' variable. (defalias 'zencoding-parse '(macro . #[(regex nums label &rest body) "\304\305\306\307\310\311 \"DF\312\306\313\314 EDC\nBB\315\316\315\317\316\320\321 ECBDCBCBCBF\207" [regex nums body label zencoding-aif zencoding-regex input quote number-sequence 0 let elt it \` \, error concat "expected "] 11 (#$ . 687)])) #@79 Run a parser and update the input properly, extract the parsed expression. (defalias 'zencoding-run '(macro . #[(parser then-form &rest else-forms) "\303\304B\305\306 E\n\206 \307BBB\207" [parser then-form else-forms zencoding-pif (input) let ((input (cdr it)) (expr (car it))) (it)] 5 (#$ . 1066)])) #@59 OR two parsers. Try one parser, if it fails try the next. (defalias 'zencoding-por '(macro . #[(parser1 parser2 then-form &rest else-forms) "\304\305B\306\307 E\304\n\310B\306\311 E BBBF\207" [parser1 then-form parser2 else-forms zencoding-pif (input) let ((input (cdr it)) (expr (car it))) (input) ((input (cdr it)) (expr (car it)))] 8 (#$ . 1378)])) #@70 Return a list of (`ref') matches for a `regex' on a `string' or nil. (defalias 'zencoding-regex #[(regexp string refs) "\303\304\305Q \"\205\306\307\310\n!\203\n\202\nC\"\207" [regexp string refs string-match "^" "\\([^\n]*\\)$" mapcar #[(ref) "\302 \"\207" [ref string match-string] 3] sequencep] 4 (#$ . 1737)]) #@54 Parse a zen coding expression with optional filters. (defalias 'zencoding-expr #[(input) "\303\304\305#\211\203 \306\234 )\202\307\310D)\211@\307=\204> \311\234 \306\234\312\n!\211@\307=\2049\313 \"\202: +\202C\313\314 \")\207" [input it filters zencoding-regex "\\(.*?\\)|" (0 1 2) 2 error "expected expr|filter" 1 zencoding-extract-filters zencoding-filter zencoding-default-filter] 5 (#$ . 2065)]) #@84 Parse a zen coding expression with no filter. This pretty much defines precedence. (defalias 'zencoding-subexpr #[(input) "\303!\211@\304=\204 A @ *\202s\305!\211@\304=\204, A @ *\202r\306!\211@\304=\204B A @ *\202q\307!\211@\304=\204X A @ *\202p\310!\211@\304=\204n A @ *\202o\311)))))\207" [input it expr zencoding-siblings error zencoding-parent-child zencoding-multiplier zencoding-pexpr zencoding-tag (error "no match, expecting ( or a-zA-Z0-9")] 3 (#$ . 2489)]) #@34 Extract filters from expression. (defalias 'zencoding-extract-filters #[(input) "\304\305\306#\211\203 \307\234 )\202\310\311D)\211@\310=\204= \312\234 \307\234\313\n!\211@\310=\2048 B\2029 +\202W\304\314\315#\211\203S \312\234 \312\234)C\202V\310\316D))\207" [input it more-filters filter-name zencoding-regex "\\([^\\|]+?\\)|" (0 1 2) 2 error "expected " 1 zencoding-extract-filters "\\([^\\|]+\\)" (0 1) "expected filter name"] 5 (#$ . 2994)]) #@39 Construct AST with specified filters. (defalias 'zencoding-filter #[(input filters) "\305!\211@\306=\204 @ A\307\f E\n*B\202 )\207" [input it rest result filters zencoding-subexpr error filter] 4 (#$ . 3468)]) #@52 Default filter(s) to be used if none is specified. (defalias 'zencoding-default-filter #[nil "\304\305\306 \206\307\310#@\311\312 \235\211\203 A@\202\n,\207" [file-ext defaults default-else selected-default zencoding-regex ".*\\(\\..*\\)" buffer-file-name "" 1 (".html" ("html") ".htm" ("html") ".haml" ("haml") ".clj" ("hic")) ("html")] 5 (#$ . 3692)]) (defalias 'zencoding-multiplier #[(input) "\305!\211@\306=\204: A @\n\307\310\311#\211\2033 \312\234\313 \314\234!\315\316\f \"D*B\2026\306\317D,\202v\320!\211@\306=\204t A @\n\307\310\321#\211\203m \312\234\313 \314\234!\315\316\f \"D*B\202p\306\317D,\202u\322))\207" [input it expr multiplier multiplicand zencoding-pexpr error zencoding-regex "\\*\\([0-9]+\\)" (0 1 2) 2 read 1 list make-list "expected *n where n is a number" zencoding-tag (0 1 2) (error "expected *n multiplier")] 5]) #@14 Parse a tag. (defalias 'zencoding-tag #[(input) "\305!\211@\306=\204_ A @\nA@\nAA\307!\211@\306=\2049 A @\310\311\f \nAAED\"*\202C\310\311\f \312BBD\")\211@\306=\204Z @ A\313\n\"*\202[ -\202b\314!)\207" [input it expr has-body\? tagname zencoding-tagname error zencoding-identifier zencoding-tag-classes tag (nil) zencoding-tag-props zencoding-default-tag] 6 (#$ . 4581)]) #@23 Parse a #id or .class (defalias 'zencoding-default-tag #[(input) "\302\303\304#\211\203 \305\234\306\307 \310\234P!)\202\311\312D)\207" [input it zencoding-regex "\\([#|\\.]\\)" (0 1) 1 zencoding-tag "div" 0 error "expected tagname"] 5 (#$ . 4983)]) (defalias 'zencoding-tag-props #[(tag input) "A@\306\n!\211@\307=\204% A @\fA\300\310 C\"D\n+B\202-\300\310 \311\"D\nB*\207" [tag tag-data input it expr props zencoding-props error append (nil)] 5]) #@19 Parse many props. (defalias 'zencoding-props #[(input) "\303!\211@\304=\2043 A @\305!\211@\304=\204)\306\n @ABB AB\202/\306\nCBB+\2024 )\207" [input it expr zencoding-prop error zencoding-props props] 4 (#$ . 5454)]) (defalias 'zencoding-prop #[(input) "\304\305\306#\211\203B \307\234\310!\211@\311=\204= A @\nA\312 \"\211@\311=\2042 \2029\313 !\314BB,\202> *\202E\311\315D)\207" [input it expr name zencoding-regex " " (0 1) 1 zencoding-name error zencoding-prop-value read ("") "expected space"] 5]) (defalias 'zencoding-prop-value #[(name input) "\304\305\306#\211\203! \307\234 \310\234 \307\234\311 !\nD+B\202$\312\313D)\211@\312=\2041 \202V\304\314\315#\211\203R \307\234 \310\234 \307\234\311 !\nD+B\202U\312\316D))\207" [input it value name zencoding-regex "=\"\\(.*?\\)\"" (0 1 2) 2 1 read error "expected =\"property value\"" "=\\([^\\,\\+\\>\\ )]*\\)" (0 1 2) "expected =property value"] 5]) (defalias 'zencoding-tag-classes #[(tag input) "A@\306\n!\211@\307=\204( A @\310\311\fA\"\300\312 C\"D\n+B\2020\300\312 \313\"D\nB*\207" [tag tag-data input it expr classes zencoding-classes error mapcar #[(cls) "A@A\207" [cls] 1] append (nil)] 5]) #@63 Parse a tagname a-zA-Z0-9 tagname (e.g. html/head/xsl:if/br). (defalias 'zencoding-tagname #[(input) "\305\306\307#\211\203/ \310\234 \311\234\305\312\n\311#\211\203! @\202\"\n\313\f ?BB,B\2022\314\315D)\207" [input it tag-spec empty-tag tag zencoding-regex "\\([a-zA-Z][a-zA-Z0-9:-]*/?\\)" (0 1 2) 2 1 "\\([^/]*\\)/" tagname error "expected tagname, a-zA-Z0-9"] 5 (#$ . 6670)]) #@53 A zen coding expression with parentheses around it. (defalias 'zencoding-pexpr #[(input) "\303\304\305#\211\203; \306\234\307!\211@\310=\2046 A @\303\311\312#\211\2031\n \306\234B\2022\313+\2027 *\202>\310\314D)\207" [input it expr zencoding-regex "(" (0 1) 1 zencoding-subexpr error ")" (0 1) (error "expecting `)'") "expected ("] 5 (#$ . 7066)]) #@78 Parse an tag>e expression, where `n' is an tag and `e' is any expression. (defalias 'zencoding-parent-child #[(input) "\306!\211@\307=\2049 A @\nA@\310\n\"\211@\307=\2044\f@\fA\311\312\313 \"CB*B\2025\314,\202T\315!\211@\307=\204R A @\316\n\"*\202S\317))\207" [input it expr items rest child zencoding-multiplier error zencoding-child-sans list mapcar #[(parent) "\302 E\207" [parent child parent-child] 3] (error "expected child") zencoding-tag zencoding-child (error "expected parent")] 5 (#$ . 7435)]) (defalias 'zencoding-child-sans #[(parent input) "\303\304\305#\211\203) \306\234\307!\211@\310=\204$ A @ *\202%\311*\202,\310\312D)\207" [input it expr zencoding-regex ">" (0 1) 1 zencoding-subexpr error (error "expected child") "expected >"] 5]) (defalias 'zencoding-child #[(parent input) "\305\306\307#\211\2030 \310\234\311!\211@\312=\204+ A @\n\313\f E+B\202,\314*\2023\312\315D)\207" [input it expr child parent zencoding-regex ">" (0 1) 1 zencoding-subexpr error parent-child (error "expected child") "expected >"] 5]) (defalias 'zencoding-sibling #[(input) "\303!\211@\304=\204 A @ *\202E\305!\211@\304=\204, A @ *\202D\306!\211@\304=\204B A @ *\202C\307)))\207" [input it expr zencoding-pexpr error zencoding-multiplier zencoding-tag (error "expected sibling")] 3]) #@56 Parse an e+e expression, where e is an tag or a pexpr. (defalias 'zencoding-siblings #[(input) "\305!\211@\306=\204M A @\n\307\310\311#\211\203F \312\234\313!\211@\306=\204> A @\n\314 \fE+B\202B\315 \"*\202I\306\316D,\202N\317)\207" [input it expr parent child zencoding-sibling error zencoding-regex "\\+" (0 1) 1 zencoding-subexpr sibling zencoding-expand "expected +" (error "expected first sibling")] 5 (#$ . 8790)]) (defvar zencoding-expandable-tags '("dl" ">(dt+dd)" "ol" ">li" "ul" ">li" "table" ">tr>td")) #@54 Parse an e+ expression, where e is an expandable tag (defalias 'zencoding-expand #[(parent input) "\306\234@\211\n\235\211\203M\307 A@\260\"\310\311 \312#\211\2030\306\234\313\306\234!)\2023\314\315D)\211@\314=\204H\316\f@@EC\202I\f*\202N\317*\207" [parent parent-tag zencoding-expandable-tags expandable expansion input 1 zencoding-child zencoding-regex "+\\(.*\\)" (0 1) zencoding-subexpr error "expected +expr" sibling (error "expected second sibling") it] 5 (#$ . 9331)]) #@64 Parse a class or identifier name, e.g. news, footer, mainimage (defalias 'zencoding-name #[(input) "\302\303\304#\211\203 \305\234\306 \307\234B)B\202\310\311D)\207" [input it zencoding-regex "\\([a-zA-Z][a-zA-Z0-9-_:]*\\)" (0 1 2) 2 name 1 error "expected class or identifer name"] 5 (#$ . 9836)]) #@41 Parse a classname expression, e.g. .foo (defalias 'zencoding-class #[(input) "\303\304\305#\211\203- \306\234\307!\211@\310=\204( A @\311\nD*B\202)\312*\2020\310\313D)\207" [input it expr zencoding-regex "\\." (0 1) 1 zencoding-name error class (error "expected class name") "expected ."] 5 (#$ . 10149)]) #@43 Parse an identifier expression, e.g. #foo (defalias 'zencoding-identifier #[(input) "\303\304\305#\211\203- \306\234\307!\211@\310=\204( A @\311\nB*B\202) *\2020\310\312D)\207" [input it expr zencoding-regex "#" (0 1) 1 zencoding-name error identifier "expected #"] 5 (#$ . 10473)]) #@21 Parse many classes. (defalias 'zencoding-classes #[(input) "\303!\211@\304=\2043 A @\305!\211@\304=\204)\306\n @ABB AB\202/\306\nCBB+\2024\307)\207" [input it expr zencoding-class error zencoding-classes classes (error "expected class")] 4 (#$ . 10774)]) (defvar zencoding-inline-tags '("a" "abbr" "acronym" "cite" "code" "dd" "dfn" "dt" "em" "h1" "h2" "h3" "h4" "h5" "h6" "kbd" "li" "q" "span" "strong" "var")) (defvar zencoding-block-tags '("p")) (defvar zencoding-self-closing-tags '("br" "img" "input")) #@72 Function to execute when expanding a leaf node in the Zencoding AST. (defvar zencoding-leaf-function nil (#$ . 11299)) (defvar zencoding-filters '("html" (zencoding-primary-filter zencoding-make-html-tag) "c" (zencoding-primary-filter zencoding-make-commented-html-tag) "haml" (zencoding-primary-filter zencoding-make-haml-tag) "hic" (zencoding-primary-filter zencoding-make-hiccup-tag) "e" (zencoding-escape-xml))) #@89 Process filter that needs to be executed first, ie. not given output from other filter. (defalias 'zencoding-primary-filter #[(input proc) "<\205 A@\303\n\")\207" [input proc tag-maker zencoding-transform-ast] 3 (#$ . 11723)]) #@75 Process filters, chain one filter output as the input of the next filter. (defalias 'zencoding-process-filter #[(filters input) "@ \235A\211\205) A@\211@\211\f\"\n\203&\306\n\"\202(+*\207" [filters zencoding-filters more-filters filter-data proc fun zencoding-process-filter input filter-output] 4 (#$ . 11961)]) #@46 Extract tag info and pass them to tag-maker. (defalias 'zencoding-make-tag #[(tag-maker tag-info &optional content) "\211A\242\211A\242\211A\242\211A\242\211A\242\206,\n\205, \235?? \f \203A\202I\n\205I\n &.\207" [tag-info name has-body\? id classes props content zencoding-self-closing-tags self-closing\? tag-maker zencoding-leaf-function] 7 (#$ . 12297)]) #@27 Create HTML markup string (defalias 'zencoding-make-html-tag #[(tag-name tag-id tag-classes tag-props self-closing\? content) "\306\307\310#\311\312\n\313\310$\311\313\f\313\314\315%\205\316\317\"\235\2067G\320V\2057\235?\204C\205D\317\321 \203U\322\202v\323\205n\204e\203l\324!\202n\325\323\260\260.\207" [tag-id id tag-classes classes tag-props props zencoding-concat-or-empty " id=\"" "\"" zencoding-mapconcat-or-empty " class=\"" " " nil #[(prop) "\301@!\302A@\303R\207" [prop symbol-name "=\"" "\""] 4] string-match "\n" 1 "<" "/>" ">" zencoding-indent "\n" "\n" body classes id] 9 (#$ . 13464)]) #@20 Create HAML string (defalias 'zencoding-make-haml-tag #[(tag-name tag-id tag-classes tag-props self-closing\? content) "\306\232\203 \204\n\203\307\202\310P\311\312 \"\313\314\n\314#\313\315 \316\317\320%\211 \f\2059\321!\260,\207" [tag-name tag-id tag-classes tag-props props classes "div" "" "%" zencoding-concat-or-empty "#" zencoding-mapconcat-or-empty "." "{" ", " "}" #[(prop) "\301\302@!\303A@\304\260\207" [prop ":" symbol-name " => \"" "\""] 5] zencoding-indent id name content] 10 (#$ . 13987)]) #@22 Create Hiccup string (defalias 'zencoding-make-hiccup-tag #[(tag-name tag-id tag-classes tag-props self-closing\? content) "\306\307\"\310\311\n\311#\310\312\f\313\314\315%\205\316\317\"\235\2065G\320V\2055\235?\321 \205W\204L\203S\322!\202W\323P\324\260-\207" [tag-id id tag-classes classes tag-props props zencoding-concat-or-empty "#" zencoding-mapconcat-or-empty "." " {" ", " "}" #[(prop) "\301\302@!\303A@\304\260\207" [prop ":" symbol-name " \"" "\""] 5] string-match "\n" 1 "[:" zencoding-indent " " "]" content content-multiline\? tag-name zencoding-block-tags zencoding-inline-tags block-tag\?] 7 (#$ . 14526)]) #@48 Return prefixed suffixed text or empty string. (defalias 'zencoding-concat-or-empty #[(prefix body &optional suffix) "\203 \nQ\207\303\207" [body prefix suffix ""] 3 (#$ . 15202)]) #@60 Return prefixed suffixed mapconcated text or empty string. (defalias 'zencoding-mapconcat-or-empty #[(prefix list-body delimiter &optional suffix map-fun) "\203 \203\f \202 \306\307\n # \f Q*\207\310\207" [list-body map-fun mapper delimiter body prefix identity mapconcat "" suffix] 4 (#$ . 15393)]) #@44 Escapes XML-unsafe characters: <, > and &. (defalias 'zencoding-escape-xml #[(input proc) "\301\302\303\301\304\305\301\306\307;\203\202\310\311 \"###\207" [input replace-regexp-in-string "<" "<" ">" ">" "&" "&" zencoding-process-filter zencoding-default-filter] 12 (#$ . 15708)]) #@53 Transform AST (containing filter data) into string. (defalias 'zencoding-transform #[(ast-with-filters) "A@AA@\303\n \"*\207" [ast-with-filters ast filters zencoding-process-filter] 3 (#$ . 16012)]) #@50 Transform AST (without filter data) into string. (defalias 'zencoding-transform-ast #[(ast tag-maker) "@\211\306\267\202f\307\310\311!\211\211\fL\210)\312\313\314\315\316D\317\nD\320FE)A@\321#\202g\322\fA@\"\202gA@A@\323AA@\f\"\322\f #*\202g\323A@\f\"\323AA@\f\"\211\321Q*\202g\324)\207" [ast type #1=#:--cl-make-tag-fun-- #2=#:v tag-maker children #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (list 9 tag 42 parent-child 51 sibling 76)) mapconcat make-symbol "--make-tag-fun--" lambda (&rest --cl-rest--) apply function #[(#3=#:G0 sub-ast) "\302 J\"\207" [sub-ast #3# zencoding-transform-ast] 3] quote --cl-rest-- "\n" zencoding-make-tag zencoding-transform-ast nil parent sib2 sib1] 8 (#$ . 16221)]) #@56 Calculate indent size using current mode as a guidance (defalias 'zencoding-indent-size #[nil "rpq\210)\211\304\230\203\n\202& \305\230\203 \202& \306\230\203% \202&\307)\207" [major-mode mode nxml-child-indent sgml-basic-offset "nxml-mode" "html-mode" "sgml-mode" 4] 3 (#$ . 16996)]) #@17 Indent the text (defalias 'zencoding-indent #[(text) "\205\301\302\211\303\304 \305\"P\302P#\207" [text replace-regexp-in-string "\n" make-string zencoding-indent-size 32] 6 (#$ . 17297)]) (defalias 'zencoding-test-cases #[nil "\301\302\303\"\210\304G!\305P)\207" [tests (("a" "") ("a.x" "") ("a#q.x" "") ("a#q.x.y.z" "") ("#q" "
" "
") (".x" "
" "
") ("#q.x" "
" "
") ("#q.x.y.z" "
" "
") ("a/" "") ("a/.x" "") ("a/#q.x" "") ("a/#q.x.y.z" "") ("input type=text" "") ("img" "") ("img>metadata/*2" "" " " " " "") ("a+b" "" "") ("a+b+c" "" "" "") ("a.x+b" "" "") ("a#q.x+b" "" "") ("a#q.x.y.z+b" "" "") ("a#q.x.y.z+b#p.l.m.n" "" "") ("table+" "" " " " " " " "
" "
") ("dl+" "
" "
" "
" "
") ("ul+" "") ("ul++ol+" "" "
    " "
  1. " "
") ("ul#q.x.y m=l+" "") ("a>b" "") ("a>b>c" "") ("a.x>b" "") ("a#q.x>b" "") ("a#q.x.y.z>b" "") ("a#q.x.y.z>b#p.l.m.n" "") ("#q>.x" "
" "
" "
" "
") ("a>b+c" "" " " " " "") ("a>b+c>d" "" " " " " "") ("a*1" "") ("a*2" "" "") ("a/*2" "" "") ("a*2+b*2" "" "" "" "") ("a*2>b*2" "" " " " " "" "" " " " " "") ("a>b*2" "" " " " " "") ("a#q.x>b#q.x*2" "" " " " " "") ("a#q.x>b/#q.x*2" "" " " " " "") ("a x" "") ("a x=" "") ("a x=\"\"" "") ("a x=y" "") ("a x=\"y\"" "") ("a x=\"()\"" "") ("a x m" "") ("a x= m=\"\"" "") ("a x=y m=l" "") ("a/ x=y m=l" "") ("a#foo x=y m=l" "") ("a.foo x=y m=l" "") ("a#foo.bar.mu x=y m=l" "") ("a/#foo.bar.mu x=y m=l" "") ("a x=y+b" "" "") ("a x=y+b x=y" "" "") ("a x=y>b" "") ("a x=y>b x=y" "") ("a x=y>b x=y+c x=y" "" " " " " "") ("(a)" "") ("(a)+(b)" "" "") ("a>(b)" "") ("(a>b)>c" "") ("(a>b)+c" "" "") ("z+(a>b)+c+k" "" "" "" "") ("(a)*2" "" "") ("((a)*2)" "" "") ("((a))*2" "" "") ("(a>b)*2" "" "") ("(a+b)*2" "" "" "" "") ("a.b|c" "" "" "") ("#a>.b|c" "" "
" " " "
" "
" " " "
" "") ("a|haml" "%a") ("a#q.x.y.z|haml" "%a#q.x.y.z") ("a#q.x x=y m=l|haml" "%a#q.x{:x => \"y\", :m => \"l\"}") ("div|haml" "%div") ("div.footer|haml" ".footer") (".footer|haml" ".footer") ("p>a href=#+br|haml" "%p" " %a{:href => \"#\"}" " %br") ("a|hic" "[:a]") ("a#q.x.y.z|hic" "[:a#q.x.y.z]") ("a#q.x x=y m=l|hic" "[:a#q.x {:x \"y\", :m \"l\"}]") (".footer|hic" "[:div.footer]") ("p>a href=#+br|hic" "[:p" " [:a {:href \"#\"}]" " [:br]]") ("#q>(a*2>b)+p>b|hic" "[:div#q" " [:a [:b]]" " [:a [:b]]" " [:p" " [:b]]]") ("script src="|e" "<script src=\"&quot;\">" "</script>")) mapc #[(input) "\303\304A\305#\306\307@!@!\211 \232?\205!\310\311@\312\n\313 \260!*\207" [input actual expected mapconcat identity "\n" zencoding-transform zencoding-expr error "Assertion " " failed:" " == "] 8] number-to-string " tests performed. All OK."] 3]) (custom-declare-group 'zencoding nil "Customization group for zencoding-mode." :group 'convenience) #@86 Extract a zencoding expression and the corresponding bounds for the current line. (defalias 'zencoding-expr-on-line #[nil "\304 \305 \306 \"\307\310\n\311#\211@\205 @ E,\207" [start end line expr line-beginning-position line-end-position buffer-substring-no-properties zencoding-regex "\\([ ]*\\)\\([^\n]+\\)" 2] 5 (#$ . 22241)]) #@40 Number of spaces used for indentation. (custom-declare-variable 'zencoding-indentation 4 '(#$ . 22589) :type '(number :tag "Spaces") :group 'zencoding) (defalias 'zencoding-prettify #[(markup indent) "\305\211\306\"\307\"\305\211\306 \"\307\"\211\310\311\211 P\310\312\n\f##P*\207" [indent zencoding-indentation tab first-col markup format "%%%ds" "" replace-regexp-in-string "\n" " "] 9]) #@260 Replace the current line's zencode expression with the corresponding expansion. If prefix ARG is given or region is visible call `zencoding-preview' to start an interactive preview. Otherwise expand line directly. For more information see `zencoding-mode'. (defalias 'zencoding-expand-line #[(arg) "` \203 \n?\202\f\n\211\203\306 \210\307\310w\210`\202\"\f\205\"\311  \2032\310\210\307\310x\210`\2028\f\2058\312  \203Ib\210\313 \"\202u\314 \211\205t\315\316@!@!\317\320 \"\212A@AA@|\210\321!+),\207" [here zencoding-preview-default arg preview mark-active beg beginning-of-line " " nil region-beginning region-end zencoding-preview zencoding-expr-on-line zencoding-transform zencoding-expr zencoding-prettify current-indentation zencoding-insert-and-flash end expr markup pretty] 4 (#$ . 22992) "P"]) #@32 Keymap for zencode minor mode. (defvar zencoding-mode-keymap nil (#$ . 23839)) (byte-code "\204\301 \302\303\304#\210\302\305\304#\210\301\207" [zencoding-mode-keymap make-sparse-keymap define-key "\n" zencoding-expand-line [C-return]] 4) #@97 Non-nil if Zencoding mode is enabled. Use the command `zencoding-mode' to change this variable. (defvar zencoding-mode nil (#$ . 24090)) (make-variable-buffer-local 'zencoding-mode) #@930 Minor mode for writing HTML and CSS markup. With zen coding for HTML and CSS you can write a line like This is a minor mode. If called interactively, toggle the `Zencoding mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `zencoding-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. ul#name>li.item*2 and have it expanded to This minor mode defines keys for quick access: \{zencoding-mode-keymap} Home page URL `http://www.emacswiki.org/emacs/ZenCoding'. See also `zencoding-expand-line'. (defalias 'zencoding-mode #[(&optional arg) "\305  \306=\203\n?\202 \247\203 \307W\203\310\202\311\312\303!\2032\313\302 \"\n\2032\302 B\314\315\n\203<\316\202=\317\"\210\320\321!\203b\305 \203Q\305 \232\203b\322\323\324\n\203]\325\202^\326\f#\210))\327 \210\n\207" [#1=#:last-message arg zencoding-mode local-minor-modes local current-message toggle 1 nil t boundp delq run-hooks zencoding-mode-hook zencoding-mode-on-hook zencoding-mode-off-hook called-interactively-p any " in current buffer" message "Zencoding mode %sabled%s" "en" "dis" force-mode-line-update] 4 (#$ . 24279) (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle))]) (defvar zencoding-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\313\310\211%\207" [zencoding-mode-keymap zencoding-mode-hook variable-documentation put "Hook run after entering or leaving `zencoding-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode zencoding-mode " Zen"] 6) (defalias 'zencoding-transform-yas #[(ast) "\303\304\305\n!*\207" [leaf-count zencoding-leaf-function ast 0 #[nil "\301\302T\211\"\207" [leaf-count format "$%d"] 4] zencoding-transform] 2]) (defalias 'zencoding-expand-yas #[nil "\303 \211\2054\304\305@!@!\306\307\310 #A@AA@|\210\nc\210\311A@`\"\210\312A@`{A@`#*)\207" [expr markup filled zencoding-expr-on-line zencoding-transform-yas zencoding-expr replace-regexp-in-string "><" ">\n<" indent-region yas/expand-snippet] 5 nil nil]) (defvar zencoding-preview-input nil) (make-local-variable 'zencoding-preview-input) (defvar zencoding-preview-output nil) (make-local-variable 'zencoding-preview-output) (defvar zencoding-old-show-paren nil) (byte-code "\300\301!\210\302\303\304\305\306\307%\210\302\310\311\312\306\307%\207" [make-local-variable zencoding-old-show-paren custom-declare-face zencoding-preview-input ((default :box t :inherit secondary-selection)) "Face for preview input field." :group zencoding zencoding-preview-output ((default :inherit highlight)) "Face for preview output field."] 6) (defvar zencoding-preview-keymap (byte-code "\301 \302\303\304#\210\302\305\304#\210\302\306\307#\210)\207" [map make-sparse-keymap define-key " " zencoding-preview-accept [return] [(control 103)] zencoding-preview-abort] 4)) (defalias 'zencoding-preview-accept #[nil "\304 !\203\305\306 !!\204\307\310!\210\202.\311 \312\n!\211\203-\313 \314 !|\210\315 !\210*)\316 \207" [zencoding-preview-input ovli indent markup overlayp bufferp overlay-buffer message "Preview is not active" current-indentation zencoding-preview-transformed line-beginning-position overlay-end zencoding-insert-and-flash zencoding-preview-abort] 4 nil nil]) (defvar zencoding-flash-ovl nil) (make-variable-buffer-local 'zencoding-flash-ovl) (defalias 'zencoding-remove-flash-ovl #[(buf) "rq\210\302 !\203\303 !\210\304\211)\207" [buf zencoding-flash-ovl overlayp delete-overlay nil] 2]) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\313\306\307&\207" [custom-declare-variable zencoding-preview-default t "If non-nil then preview is the default action.\nThis determines how `zencoding-expand-line' works by default." :type boolean :group zencoding zencoding-insert-flash-time 0.5 "Time to flash insertion.\nSet this to a negative number if you do not want flashing the\nexpansion after insertion." (number :tag "Seconds")] 8) (defalias 'zencoding-insert-and-flash #[(markup) "\304p!\210` c\210\305`\"\306\n\307\310#\210\311 W\205 \312 \313\304p$)\207" [here markup zencoding-flash-ovl zencoding-insert-flash-time zencoding-remove-flash-ovl make-overlay overlay-put face zencoding-preview-output 0 run-with-idle-timer nil] 5]) #@135 Expand zencode between BEG and END interactively. This will show a preview of the expanded zen code and you can accept it or skip it. (defalias 'zencoding-preview #[(beg end) "\306 \210\204 \307\310!\207 \301\311!\210`b\210\312y\210i\313U\204\"\314c\210`\315 \316\211\317%\315\f\211\"\320\321\322\323# \324\322\325#\210\324\326!#\210\324\322\327#\210\324\330 #\210\331\332\333\317\211$\210 b\210\331\334\335\317\211$-\207" [beg show-paren-mode zencoding-old-show-paren here opos end zencoding-preview-abort message "Region not active" -1 1 0 "\n" make-overlay nil t propertize " Zen preview. Choose with RET. Cancel by stepping out. \n" face tooltip overlay-put zencoding-preview-input keymap zencoding-preview-output before-string add-hook before-change-functions zencoding-preview-before-change post-command-hook zencoding-preview-post-command ovli ovlo info zencoding-preview-keymap] 6 (#$ . 29103) (byte-code "\203\n\301 \302 D\207\303\211D\207" [mark-active region-beginning region-end nil] 2)]) (defvar zencoding-preview-pending-abort nil) (make-variable-buffer-local 'zencoding-preview-pending-abort) (defalias 'zencoding-preview-before-change #[(beg end) "\304 !V\204 \305 !W\204 \n\304 !V\204 \n\305 !W\205#\306\211\207" [beg zencoding-preview-input end zencoding-preview-pending-abort overlay-end overlay-start t] 3]) #@25 Abort zen code preview. (defalias 'zencoding-preview-abort #[nil "\304\305\306\307\310#\210\311 !\203\312 !\210\304\311\n!\203\312\n!\210\304\305\313\314\310#\210 \205-\315\316!\207" [zencoding-preview-pending-abort zencoding-preview-input zencoding-preview-output zencoding-old-show-paren nil remove-hook before-change-functions zencoding-preview-before-change t overlayp delete-overlay post-command-hook zencoding-preview-post-command show-paren-mode 1] 4 (#$ . 30477) nil]) (defalias 'zencoding-preview-post-command #[nil "\3011\302 0\207\303\304\")\207" [err (error) zencoding-preview-post-command-1 message "zencoding-preview-post: %s"] 3]) (defalias 'zencoding-preview-post-command-1 #[nil "\204`\302 !X\203`\303 !Y\203\304\305 !\207\306 \207" [zencoding-preview-pending-abort zencoding-preview-input overlay-end overlay-start zencoding-update-preview current-indentation zencoding-preview-abort] 3]) (defalias 'zencoding-preview-transformed #[(indent) "\305\306!\307!\"\310 !@\211\311=?\205\"\312\n!\211\205!\313 \f\")*\207" [zencoding-preview-input string ast output indent buffer-substring-no-properties overlay-start overlay-end zencoding-expr error zencoding-transform zencoding-prettify] 5]) (defalias 'zencoding-update-preview #[(indent) "\304!\211\205 \305 \306\307#\211\205\310 \311\n\312P#*\207" [indent pretty show zencoding-preview-output zencoding-preview-transformed propertize face highlight overlay-put after-string "\n"] 6]) (provide 'zencoding-mode)