mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-19 a4b9172aefa91861b587831e06f55b1e19f3f3be
commit | author | age
5cb5f7 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (require 'smartparens)
16 #@59 Wrapper for `ruby-forward-sexp' based on `enh-ruby-mode'.
17 (defalias 'sp-ruby-forward-sexp #[0 "\300\301!\203    \301 \207\302 \207" [boundp enh-ruby-forward-sexp ruby-forward-sexp] 2 (#$ . 431) nil])
18 #@60 Wrapper for `ruby-backward-sexp' based on `enh-ruby-mode'.
19 (defalias 'sp-ruby-backward-sexp #[0 "\300\301!\203    \301 \207\302 \207" [boundp enh-ruby-backward-sexp ruby-backward-sexp] 2 (#$ . 635) nil])
20 #@49 Turn whitespace around point to just one space.
21 (defalias 'sp-ruby-maybe-one-space #[0 "\301\302\303\"\203 \304u\210\202\302\305\306!)\262\204?\307\305\306!)\262\204?\301\310\303\"\204?\311\305\306!)\262\203D\301\312\303\"\203D\212\313 \210)\301\314\303\"?\205\204\212\315u\210\316\305\306!)\262\206}\317\305\306!)\262\206}\320\305\306!)\262\206}\321\305\306!)\262)\205\204\322\323!\207" [inhibit-changing-match-data looking-back " " nil -1 t looking-at "}" "{" "\\sw" ":" just-one-space "^.?" -2 ".[^:] [.([,;]" ".. ::" ".[.@$] " ":: " delete-char 1] 3 (#$ . 843)])
22 #@95 Better way of joining ruby lines.
23
24 ARG is how many indentation to delete.
25
26 (fn &optional ARG)
27 (defalias 'sp-ruby-delete-indentation #[256 "\300!\210\301 \207" [delete-indentation sp-ruby-maybe-one-space] 3 (#$ . 1450)])
28 #@86 Handler for ruby block-like insertions.
29 ID, ACTION, CONTEXT.
30
31 (fn ID ACTION CONTEXT)
32 (defalias 'sp-ruby-block-post-handler #[771 "\300\232\203\212\301 \210\302 \210)\302 \210\303#\207" [insert newline indent-according-to-mode sp-ruby-post-handler] 7 (#$ . 1677)])
33 #@84 Handler for ruby def-like insertions.
34 ID, ACTION, CONTEXT.
35
36 (fn ID ACTION CONTEXT)
37 (defalias 'sp-ruby-def-post-handler #[771 "\300\232\203\212\301c\210\302 \210\303 \210)\304\305!\210\306#\207" [insert "x" newline indent-according-to-mode delete-char 1 sp-ruby-post-handler] 7 (#$ . 1953)])
38 #@65 Ruby post handler.
39 ID, ACTION, CONTEXT.
40
41 (fn ID ACTION CONTEXT)
42 (defalias 'sp-ruby-post-handler #[771 "\301\302\"\301\303\"\304\232\203\"\305\306!\210\307 \210\212\310 \210\310!\210\311 \210)\312\232\205Y\211\313\301\314\"\301\315\"G\\!\313\301\316\"\301\317\"GZ!\320!\210\311 \210\313 U\204S\305\321!\210\307 \266\202\262\266\202\207" [sp-handler-context plist-get :arg :enc barf-backward sp-ruby-delete-indentation 1 indent-according-to-mode sp-backward-sexp sp-ruby-maybe-one-space barf-forward line-number-at-pos :beg :op :end :cl sp-forward-sexp -1] 13 (#$ . 2256)])
43 #@79 Handler for ruby slurp and barf.
44 ID, ACTION, CONTEXT.
45
46 (fn ID ACTION CONTEXT)
47 (defalias 'sp-ruby-pre-handler #[771 "\302\303\"\211\304\302\305\"\302\306\"G\\!\304\302\307\"\302\310\"GZ!\311\232\203\247\212\312 \210\313\314\315!)\262\2036\316u\210\317 \210\304 U\204D\320\321!\210)\322\314\315!)\262\203r\323\324\316\"\203r\325\314!\211\205m\211\302\305\"\302\326\"GZb\262\262\204Q\327\330!\203~\331 \210\202r\323\332\316\"\203\222\321u\210\323\333\316\"\203\222\321u\210\334 \210\212\304 U\203\243\335c\210\202\246\336 \210)\337\232\203\320\327\340!\203\271\312 \210\202\255\341\314\315!)\262\203\313\336 \210\202\320\212\336 \210)\342\232\2034\212\331 \210\323\343\316\"\203\344\321u\210\317 \210\304 U\204\327\330!\203\377\344\321!\210\320\321!\210\202\320 \210)\322\314\315!)\262\203\345 \210\202\346\314\315!)\262\203$\316u\210\304 U\2031\335c\210\2024\336 \210\347\232\205\215\323\350\316\"\203D\321u\210\322\314\315!)\262\203q\323\324\316\"\203q\325\314!\211\205l\211\302\305\"\302\326\"GZb\262\262\204P\304 U\203}\335c\202\215\323\351\316\"\203\213\212\336 )\202\215\336 \266\202\262\207" [sp-handler-context inhibit-changing-match-data plist-get :enc line-number-at-pos :beg :op :end :cl slurp-backward sp-forward-sexp ";" t looking-at nil sp-ruby-maybe-one-space sp-ruby-delete-indentation -1 "::" looking-back "\\sw" sp-get-symbol :prefix thing-at-point-looking-at "\\.[[:blank:]\n]*" sp-backward-sexp "[@$:&?!]" "[@&:]" just-one-space " " newline barf-backward "[(.:[][\n[:blank:]]*" " *$" slurp-forward "." forward-symbol sp-forward-symbol "[?!;]" barf-forward "\\." "^[[:blank:]]*"] 13 (#$ . 2850)])
48 #@32 Test if ID is inline.
49
50 (fn ID)
51 (defalias 'sp-ruby-inline-p #[257 "\212\301\302\"\203 \303v\210\301\304\302\"\206\301\305\302\"?\205O\212\306\303!\210\306\307!\210\310P\311\312!)\262)\206O\212\3131L\314 \210\315 \210\316P\311\312!)\2620\202N\210\302))\207" [inhibit-changing-match-data looking-back nil -1 "^[[:blank:]]*" "= *" forward-symbol 1 " *" t looking-at (error) sp-ruby-backward-sexp sp-ruby-forward-sexp "[^[:blank:]]* *"] 4 (#$ . 4552)])
52 #@34 Test if ID is a method.
53
54 (fn ID)
55 (defalias 'sp-ruby-method-p #[257 "\212\301\302\"\203 \303v\210\211\304\305!)\262\205C\211\306P\304\305!)\262\206C\301\307\302\"\206C\301\310\302\"\206C\301\311\302\"\205C\212\312\313!\210\314 )?)\207" [inhibit-changing-match-data looking-back nil -1 t looking-at "[_?!:]" "[_:@$.]" "def \\|class \\|module " "\\.[[:blank:]\n]*" search-backward "." sp-point-in-comment] 4 (#$ . 5022)])
56 #@59 If non-nil, skip inline match.
57 MS, MB, ME.
58
59 (fn MS MB ME)
60 (defalias 'sp-ruby-skip-inline-match-p #[771 "\300!\206    \301!\207" [sp-ruby-method-p sp-ruby-inline-p] 5 (#$ . 5460)])
61 #@53 If non-nil, skip method.
62 MS, MB, ME.
63
64 (fn MS MB ME)
65 (defalias 'sp-ruby-skip-method-p #[771 "\300!\207" [sp-ruby-method-p] 5 (#$ . 5646)])
66 #@86 Test if point is inside string or word.
67 ID, ACTION, CONTEXT.
68
69 (fn ID ACTION CONTEXT)
70 (defalias 'sp-ruby-in-string-or-word-p #[771 "\300#\206\301\302\"\203\301\303!\302\"?\206\304!\207" [sp-in-string-p looking-back nil sp--strict-regexp-quote sp-ruby-method-p] 7 (#$ . 5791)])
71 #@94 Test if point is inside string, word or inline.
72 ID, ACTION, CONTEXT.
73
74 (fn ID ACTION CONTEXT)
75 (defalias 'sp-ruby-in-string-word-or-inline-p #[771 "\300#\206\301\302\"\205\303!\207" [sp-ruby-in-string-or-word-p looking-back nil sp-ruby-inline-p] 7 (#$ . 6085)])
76 #@65 Ruby pipe handler.
77 ID, ACTION, CONTEXT.
78
79 (fn ID ACTION CONTEXT)
80 (defalias 'sp-ruby-pre-pipe-handler #[771 "\300\232\205\212\301 \210)\212\302!\210\301 )\207" [insert just-one-space search-backward] 5 (#$ . 6360)])
81 #@117 Test whether to insert the closing pipe for a lambda-binding pipe pair.
82 ID, ACTION, CONTEXT
83
84 (fn ID ACTION CONTEXT)
85 (defalias 'sp-ruby-should-insert-pipe-close #[771 "\300=\203\301\302\303\304\305F!!\207\306\207" [insert thing-at-point-looking-at rx-to-string and (or "do" "{") (* space) t] 9 (#$ . 6585)])
86 #@45 Ruby skip match.
87 MS, ME, MB.
88
89 (fn MS ME MB)
90 (defalias 'sp--ruby-skip-match #[771 "\300\230\205\301#\206\302\300!\207" ["end" sp-in-string-p sp-ruby-method-p] 7 (#$ . 6903)])
91 (byte-code "\300\301\302\"\210\303\211\203\211@\300\304\305B\"\210A\266\202\202\210\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327&\210\307\330\331\320\332\322\333\326\327&    \210\307\334\311\312\335\314\336\316\337\320\340\322\341\324\325\326\327&\210\307\342\311\312\343\314\344\316\345\320\346\322\347\324\325\326\327&\210\307\350\311\312\351\314\352\316\353\320\354\322\355\324\325\326\327&\210\307\356\311\312\357\314\360\316\361\320\362\322\363\324\325\326\327&\210\307\364\311\312\365\314\366\316\367\320\370\322\371\324\325\326\327&\210\307\372\311\312\373\314\374\316\375\320\376\322\377\324\201@&\210\307\201A\311\312\201B\314\201C\316\201D\320\201E\322\201F\324\201@\326\327&\210\307\201G\311\312\201H\314\201I\316\201J\320\201K\322\201L\324\201@\326\327&\210\307\201M\311\312\201N\314\201O\316\201P\320\201Q\322\201R\324\201@\326\327&\210\307\201S\311\312\201T\314\201U\316\201V\320\201W\322\201X\324\201@\326\327&\210\307\201Y\211\312\201Z\320\201[\326\327&    \266\201\\\201]!\207" [add-to-list sp-navigate-skip-match ((ruby-mode enh-ruby-mode motion-mode) . sp--ruby-skip-match) (ruby-mode motion-mode) sp-sexp-suffix (syntax #1="") (ruby-mode enh-ruby-mode motion-mode) sp-local-pair "do" "end" :when (("SPC" "RET" "<evil-ret>")) :unless (sp-ruby-in-string-or-word-p sp-in-comment-p) :actions (insert navigate) :pre-handlers (sp-ruby-pre-handler) :post-handlers (sp-ruby-block-post-handler) :skip-match sp-ruby-skip-method-p :suffix #1# "{" "}" (sp-ruby-pre-handler) (sp-ruby-post-handler) "begin" (("SPC" "RET" "<evil-ret>")) (sp-ruby-in-string-or-word-p sp-in-comment-p) (insert navigate) (sp-ruby-pre-handler) (sp-ruby-block-post-handler) "def" (("SPC" "RET" "<evil-ret>")) (sp-ruby-in-string-or-word-p sp-in-comment-p) (insert navigate) (sp-ruby-pre-handler) (sp-ruby-def-post-handler) "class" (("SPC" "RET" "<evil-ret>")) (sp-ruby-in-string-or-word-p sp-in-comment-p) (insert navigate) (sp-ruby-pre-handler) (sp-ruby-def-post-handler) "module" (("SPC" "RET" "<evil-ret>")) (sp-ruby-in-string-or-word-p sp-in-comment-p) (insert navigate) (sp-ruby-pre-handler) (sp-ruby-def-post-handler) "case" (("SPC" "RET" "<evil-ret>")) (sp-ruby-in-string-or-word-p sp-in-comment-p) (insert navigate) (sp-ruby-pre-handler) (sp-ruby-def-post-handler) "for" (("SPC" "RET" "<evil-ret>")) (sp-ruby-in-string-or-word-p sp-in-comment-p) (insert navigate) (sp-ruby-pre-handler) (sp-ruby-def-post-handler) sp-ruby-skip-inline-match-p "if" (("SPC" "RET" "<evil-ret>")) (sp-ruby-in-string-word-or-inline-p sp-in-comment-p) (insert navigate) (sp-ruby-pre-handler) (sp-ruby-def-post-handler) "unless" (("SPC" "RET" "<evil-ret>")) (sp-ruby-in-string-word-or-inline-p sp-in-comment-p) (insert navigate) (sp-ruby-pre-handler) (sp-ruby-def-post-handler) "while" (("SPC" "RET" "<evil-ret>")) (sp-ruby-in-string-word-or-inline-p sp-in-comment-p) (insert navigate) (sp-ruby-pre-handler) (sp-ruby-def-post-handler) "until" (("SPC" "RET" "<evil-ret>")) (sp-ruby-in-string-word-or-inline-p sp-in-comment-p) (insert navigate) (sp-ruby-pre-handler) (sp-ruby-def-post-handler) "|" (sp-ruby-should-insert-pipe-close) (sp-ruby-pre-pipe-handler) provide smartparens-ruby] 19)