;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require sly cl-lib] 2) #@60 Parses form from point to `limit'. (fn LIMIT FORM-SUFFIX) (defalias 'sly-parse-form-until #[514 "`C\300\211\211\301\211A\262\242\211\262\203\260b\210\3021 \303 0\210\202!\210`W\203\260\211A\262\242\262\304\305!\204:l\203P\203P\211S\262\237\211@B\240\266\202\304\306!\203\203\307\225\3101k\311 \210`B\211\2620\210\202l\210B\262\211B\262\300B\262T\266\202\202`\3121\220\311 \210`0\202\227\211AAA@\262\313\"B\262\211B\262B\262\266\202\205\344\211@\237\244\266\202\240\266\211\301V\203\341\211A\262\242\237\211@B\240\266\211S\262\202\304@\237\207" [nil 1 (error) sly-forward-cruft looking-at "\\s)" "\\(\\s'\\|@\\)*\\s(" 0 (error) forward-sexp (scan-error) buffer-substring-no-properties] 13 (#$ . 151)]) #@204 Returns t if the character that `get-char-fn' yields has characer syntax of `syntax'. If `unescaped' is true, it's ensured that the character is not escaped. (fn GET-CHAR-FN SYNTAX &optional UNESCAPED) (defalias 'sly-compare-char-syntax #[770 "`!`S!\205$z\300H=\205$\203#\211?\206$\211z\301=?\207\302\207" [0 92 t] 8 (#$ . 939)]) (defconst sly-cursor-marker 'slynk::%cursor-marker%) #@29 (fn &optional MAX-LEVELS) (defalias 'sly-parse-form-upto-point #[256 "\214\301 \302\303!d}\210\212C\304\305\306\307#\203/\3101 \311 \210\3070\202$\210\202'\204W\312B\262\202Wn\204;\304\313\314\307#\203C\312B\262\202W\304\313\306\307#\203S\312B\262\202W\315\316!\210`@\317U\204u\3201t\321\203m[\202n\322!0\210\202u\210\3231\200\324 0\210\202\201\210\325\"\262\262)\262)\207" [sly-cursor-marker syntax-ppss line-beginning-position -500 sly-compare-char-syntax char-after "(" t (error) forward-sexp "" char-before " " re-search-forward "\\=\\(\\sw\\|\\s_\\|\\s\\.\\|#:\\|[@|]\\)*" 0 (error) up-list -5 (error) down-list sly-parse-form-until] 7 (#$ . 1339)]) #@1412 Parse the context for the symbol at point. Nil is returned if there's no symbol at point. Otherwise we detect the following cases (the . shows the point position): (defun n.ame (...) ...) -> (:defun name) (defun (setf n.ame) (...) ...) -> (:defun (setf name)) (defmethod n.ame (...) ...) -> (:defmethod name (...)) (defun ... (...) (labels ((n.ame (...) -> (:labels (:defun ...) name) (defun ... (...) (flet ((n.ame (...) -> (:flet (:defun ...) name) (defun ... (...) ... (n.ame ...) ...) -> (:call (:defun ...) name) (defun ... (...) ... (setf (n.ame ...) -> (:call (:defun ...) (setf name)) (defmacro n.ame (...) ...) -> (:defmacro name) (defsetf n.ame (...) ...) -> (:defsetf name) (define-setf-expander n.ame (...) ...) -> (:define-setf-expander name) (define-modify-macro n.ame (...) ...) -> (:define-modify-macro name) (define-compiler-macro n.ame (...) ...) -> (:define-compiler-macro name) (defvar n.ame (...) ...) -> (:defvar name) (defparameter n.ame ...) -> (:defparameter name) (defconstant n.ame ...) -> (:defconstant name) (defclass n.ame ...) -> (:defclass name) (defstruct n.ame ...) -> (:defstruct name) (defpackage n.ame ...) -> (:defpackage name) For other contexts we return the symbol at point. (defalias 'sly-extract-context #[0 "\300 \211\205\301!\302!\206\211\262\207" [sly-symbol-at-point read sly-parse-context] 4 (#$ . 2037)]) #@13 (fn NAME) (defalias 'sly-parse-context #[257 "\212\300\301!\203 \302D\202R\300\303!\203\304D\202R\300\305!\203%\306D\202R\300\307!\2037\310\311!\210\312\313D!\202R\300\314!\203s\315\316!\204G\317\311!\210\320\211\211\211\321p!\262<\204`B\262\320\262\202K\266\203\322\323\324!C\"BB\266\202\202R\2119\203\317\300C!\203\317\3251\211\326 0\202\213\210\320\300\327!\203\244\211\203\236\330\313DE\202\312\313D\202\312\211\204\254\202\312\300\331!\203\271\332E\202\312\300\333!\203\306\334E\202\312\330E\262\202R\300\335!\203\333\336D\202R\300\337!\203\347\340D\202R\300\341!\203\363\342D\202R\300\343!\203\377\344D\202R\300\345!\203 \346D\202R\300\347!\203\350D\202R\300\351!\203#\352D\202R\300\353!\203/\354D\202R\300\355!\203;\356D\202R\300\357!\203Q\360:\203L@\202MD\202R\211)\207" [sly-in-expression-p (defun *) :defun (defmacro *) :defmacro (defgeneric *) :defgeneric (setf *) backward-up-list 1 sly-parse-context setf (defmethod *) looking-at "\\s " forward-sexp nil read :defmethod append sly-arglist-specializers (error) sly-parse-toplevel-form (setf (*)) :call (labels ((*))) :labels (flet ((*))) :flet (define-compiler-macro *) :define-compiler-macro (define-modify-macro *) :define-modify-macro (define-setf-expander *) :define-setf-expander (defsetf *) :defsetf (defvar *) :defvar (defparameter *) :defparameter (defconstant *) :defconstant (defclass *) :defclass (defpackage *) :defpackage (defstruct *) :defstruct] 9 (#$ . 3599)]) #@420 A helper function to determine the current context. The pattern can have the form: pattern ::= () ;matches always | (*) ;matches inside a list | ( ) ;matches if the first element in ; the current list is and ; if matches. | (()) ;matches if we are in a nested list. (fn PATTERN) (defalias 'sly-in-expression-p #[257 "\212\300\301!!\211\302\303:\203O@\262\3041@9\203&\305 \210\306p!=\202<\247\2033\307!\210\303\202<\310\311\312#\205<\3020\202B\210\302\211\262\203OA\262\202 \211\205T\303\266\203\262)\207" [reverse sly-pattern-path nil t (error) sly-beginning-of-list read backward-up-list error "cl-etypecase failed: %s, %s" (symbol number)] 9 (#$ . 5137)]) #@16 (fn PATTERN) (defalias 'sly-pattern-path #[257 "\211\2058\211@\211\300=\203\301\2026\2119\203@\302A!B\2026\211:\203-\303\302@!B\2026\304\305\306#\2056\301\262\207" [* nil sly-pattern-path 1 error "cl-etypecase failed: %s, %s" ((member *) symbol cons)] 6 (#$ . 5965)]) #@135 Move backward to the beginning of the current expression. Point is placed before the first expression in the list. (fn &optional UP) (defalias 'sly-beginning-of-list #[256 "\300\206\301!\210\302\301!\210\303\304!\207" [backward-up-list 1 down-list skip-syntax-forward " "] 3 (#$ . 6257)]) #@21 (fn &optional UP) (defalias 'sly-end-of-list #[256 "\300\206\301!\210\302\301!\210\303\304!\207" [backward-up-list 1 forward-list down-list -1] 3 (#$ . 6556)]) (defalias 'sly-parse-toplevel-form #[0 "\3001\212\301 @b\210\302\303!\210\304\303!\210\305\306p!!)0\207\210\307\207" [(error) sly-region-for-defun-at-point down-list 1 forward-sexp sly-parse-context read nil] 3]) #@16 (fn ARGLIST) (defalias 'sly-arglist-specializers #[257 "\211\203 \211@\300>\203 \301\207\211@:\203\211@A@\302A!B\207\303\302A!B\207" [(&optional &key &rest &aux) nil sly-arglist-specializers t] 4 (#$ . 6942)]) #@89 Return object corresponding to the definition at point. (fn &optional ONLY-FUNCTIONAL) (defalias 'sly-definition-at-point #[256 "\300 \2119\204\203\211@\301>\204\302\303!\207\211\211@A\304\267\202\322\211\211G\305U\203.\211\242\2025\306\307\310GD\"\311\312\"\207\211\211G\305U\203G\211\242\202N\306\307\313GD\"\311\314\"\207\211\211G\305U\203`\211\242\202g\306\307\315GD\"\311\316\"\207\211\211\203z\211A\262\242\202\201\306\307\317GD\"\311\312\"\207\211\211G\305U\203\223\211\242\202\232\306\307\320GD\"\311\321\"\207\211\211G\305U\203\254\211\242\202\263\306\307\322GD\"\311\323\"\207\211\211G\305U\203\305\211\242\202\314\306\307\324GD\"\311\325\211#\207\302\303!\207" [sly-parse-toplevel-form (:defun :defgeneric :defmethod :defmacro :define-compiler-macro) error "Not in a definition" #s(hash-table size 12 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:defun 33 :defgeneric 33 :defmacro 58 :define-modify-macro 58 :define-compiler-macro 83 :defmethod 108 :defparameter 134 :defvar 134 :defconstant 134 :defclass 159 :defstruct 159 :defpackage 184)) 1 signal wrong-number-of-arguments (symbol) format "#'%s" (symbol) "(macro-function '%s)" (symbol) "(compiler-macro-function '%s)" (symbol &rest args) (symbol) "'%s" (symbol) "(find-class '%s)" (symbol) "(or (find-package '%s) (error \"Package %s not found\"))"] 11 (#$ . 7166)]) (defalias 'sly-current-parser-state #[0 "\300 \207" [syntax-ppss] 1]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put sly-current-parser-state speed -1 put byte-optimizer byte-compile-inline-expand] 5) (defalias 'sly-inside-string-p #[0 "\300\301 8\207" [3 syntax-ppss] 2]) (defalias 'sly-inside-comment-p #[0 "\300\301 8\207" [4 syntax-ppss] 2]) (defalias 'sly-inside-string-or-comment-p #[0 "\300 \3018\206 \3028\207" [syntax-ppss 3 4] 3]) #@37 Return the current toplevel number. (defalias 'sly-current-tlf-number #[0 "\300 @\301\212eb\210\302 \210`W\203\211T\262\202)\207" [sly-region-for-defun-at-point 0 sly-forward-sexp] 4 (#$ . 9030) nil]) #@123 Returns the path from the beginning of the current toplevel form to the atom at point, or nil if we're in front of a tlf. (defalias 'sly-current-form-path #[0 "\300\212\300\211\211`\262\301 A@\262\203@b\210`Sf\302=\204:\300u\210\303\304 \210`W\2031\211T\262\202!\211B\262b\266\300\262\202\266)\207" [nil syntax-ppss 35 0 sly-forward-sexp] 7 (#$ . 9244) nil]) (byte-code "\300\301!\210\302\303!\207" [sly-byte-compile-hotspots (sly-parse-form-upto-point sly-parse-form-until sly-compare-char-syntax) provide sly-parse] 2)