;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'sx-button) #@441 List of cons cells determining which major-mode to use when. Each car is a rule and each cdr is a major-mode. The first rule which is satisfied activates the major-mode. Point is moved to the first non-blank character before testing the rule, which can either be a string or a function. If it is a string, is tested as a regexp starting from point. If it is a function, is called with no arguments and should return non-nil on a match. (defvar sx-babel-major-mode-alist (byte-code "\300\301B\302\303B\304\305B\306\307B\310\311B\257\207" ["\\(?:#\\+\\|\\*\\)" (org-mode) "\\(?:#(\\|[(;[]\\)" (emacs-lisp-mode) "\\(?:[#$] \\)" (sh-mode) "\\\\[[:alnum:]]+[[{]" (latex-mode) "int[[:space:]]+main[[:space:]]*(" (c-mode)] 6) (#$ . 109)) (put 'sx-babel-major-mode-alist 'risky-local-variable-p t) #@66 Turn the region between BEG and END into a button. (fn BEG END) (defalias 'sx-babel--make-pre-button #[514 "\301\"\302\211\211\303\304\305\"r\211q\210\306\307\"\216c\210\310 \262eb\210\311 \262\312\313\314\315 #\262\2038\316\300!\210\305 \210)\317ed\"\210eb\210\320\321\"m\204R\322!\210\323y\210\202D\210\315 \262*\210b\210|\210\324\325\326\327\330&\207" [delay-mode-hooks buffer-substring-no-properties nil generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] sx-babel--unindent-buffer sx-babel--determine-major-mode replace-regexp-in-string "[[:space:]]+\\'" "" buffer-string make-local-variable font-lock-fontify-region make-string 32 insert-and-inherit 1 insert-text-button sx-button-copy sx-mode :type sx-question-mode-code-block] 14 (#$ . 910)]) #@61 Return the major-mode most suitable for the current buffer. (defalias 'sx-babel--determine-major-mode #[0 "\301\211\211A\262\242\211\262\2034eb\210\302\301w\210@\211;\203#\303!\202%\211 \2030\301\262A@\262\210\202\207" [sx-babel-major-mode-alist nil " \n[:blank:]" looking-at] 6 (#$ . 1752)]) #@246 Remove absolute indentation in current buffer. Finds the least indented line, and removes that amount of indentation from all lines. Primarily designed to extract the content of markdown code blocks. Returns the amount of indentation removed. (defalias 'sx-babel--unindent-buffer #[0 "\212eb\210\300m\204\301\300w\210\302\303!\204iB\262\304y\210\202\211\203F\305\306\"\262\307\310\"eb\210m\204E\311\300\312#\203E\313\314!\210\304y\210\202/\210\211\206K\315\262)\207" [nil "[:blank:]" looking-at "$" 1 apply min format "^ \\{0,%s\\}" search-forward-regexp noerror replace-match "" 0] 6 (#$ . 2067)]) (provide 'sx-babel)