;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\"\210\305\310\311\"\210\312\313\314\315!\316B\"\210\312\317\314\320!\316B\"\210\321\322\323\324\325\326\327\330\331\332& \207" [require ansi-color cl-lib comint tramp-sh autoload comint-mode "comint" help-function-arglist "help-fns" add-to-list auto-mode-alist purecopy "\\.py[iw]?\\'" python-mode interpreter-mode-alist "python[0-9.]*" custom-declare-group python nil "Python Language's flying circus support for Emacs." :group languages :version "24.3" :link (emacs-commentary-link "python")] 10) #@27 Keymap for `python-mode'. (defvar python-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\324#\210\302\325\326#\210\302\327\330#\210\302\331\332#\210\302\333\334#\210\302\335\336#\210\302\337\340#\210\302\341\342#\210\302\343\344#\210\302\345\346#\210\302\347\350#\210\302\351\352#\210\302\353\354#\210\302\355\356#\210\302\357\360#\210\302\361\362#\210\302\363\364#\210\302\365\366#\210\302\367\370#\210\371\372\373$\210\374\375!\210\376\377\201@\201A$\210\207" [global-map make-sparse-keymap define-key [remap backward-sentence] python-nav-backward-block [remap forward-sentence] python-nav-forward-block [remap backward-up-list] python-nav-backward-up-list [remap mark-defun] python-mark-defun "\n" imenu "" python-indent-dedent-line-backspace [backtab] python-indent-dedent-line "<" python-indent-shift-left ">" python-indent-shift-right "c" python-skeleton-class "d" python-skeleton-def "f" python-skeleton-for "i" python-skeleton-if "m" python-skeleton-import "t" python-skeleton-try "w" python-skeleton-while "" run-python "" python-shell-send-string "" python-shell-send-statement "" python-shell-send-region "\230" python-shell-send-defun "" python-shell-send-buffer "\f" python-shell-send-file "" python-shell-switch-to-shell "" python-check "" python-eldoc-at-point "" python-describe-at-point substitute-key-definition complete-symbol completion-at-point (lambda (#1=#:def-tmp-var) (defvar python-menu #1# #2="Python Mode menu")) nil easy-menu-do-define python-menu #2# ("Python" :help "Python-specific Features" ["Shift region left" python-indent-shift-left :active mark-active :help "Shift region left by a single indentation step"] ["Shift region right" python-indent-shift-right :active mark-active :help "Shift region right by a single indentation step"] "-" ["Start of def/class" beginning-of-defun :help "Go to start of outermost definition around point"] ["End of def/class" end-of-defun :help "Go to end of definition around point"] ["Mark def/class" mark-defun :help "Mark outermost definition around point"] ["Jump to def/class" imenu :help "Jump to a class or function definition"] "--" ("Skeletons") "---" ["Start interpreter" run-python :help "Run inferior Python process in a separate buffer"] ["Switch to shell" python-shell-switch-to-shell :help "Switch to running inferior Python process"] ["Eval string" python-shell-send-string :help "Eval string in inferior Python session"] ["Eval buffer" python-shell-send-buffer :help "Eval buffer in inferior Python session"] ["Eval statement" python-shell-send-statement :help "Eval statement in inferior Python session"] ["Eval region" python-shell-send-region :help "Eval region in inferior Python session"] ["Eval defun" python-shell-send-defun :help "Eval defun in inferior Python session"] ["Eval file" python-shell-send-file :help "Eval file in inferior Python session"] ["Debugger" pdb :help "Run pdb under GUD"] "----" ["Check file" python-check :help "Check file for errors"] ["Help on symbol" python-eldoc-at-point :help "Get help on symbol at point"] ["Complete symbol" completion-at-point :help "Complete symbol before point"])] 6) (#$ . 663)) #@114 Python mode specialized rx macro. This variant of `rx' supports common Python named REGEXPS. (fn &rest REGEXPS) (defalias 'python-rx '(macro . #[128 "\300\301\302BE\207" [rx-let ((block-start (seq symbol-start (or "def" "class" "if" "elif" "else" "try" "except" "finally" "for" "while" "with" (and "async" (+ space) (or "def" "for" "with"))) symbol-end)) (dedenter (seq symbol-start (or "elif" "else" "except" "finally") symbol-end)) (block-ender (seq symbol-start (or "break" "continue" "pass" "raise" "return") symbol-end)) (decorator (seq line-start (* space) 64 (any letter 95) (* (any word 95)))) (defun (seq symbol-start (or "def" "class" (and "async" (+ space) "def")) symbol-end)) (if-name-main (seq line-start "if" (+ space) "__name__" (+ space) "==" (+ space) (any 39 34) "__main__" (any 39 34) (* space) 58)) (symbol-name (seq (any letter 95) (* (any word 95)))) (open-paren (or "{" "[" "(")) (close-paren (or "}" "]" ")")) (simple-operator (any 43 45 47 38 94 126 124 42 60 62 61 37)) (not-simple-operator (not simple-operator)) (operator (or "==" ">=" "is" "not" "**" "//" "<<" ">>" "<=" "!=" "+" "-" "/" "&" "^" "~" "|" "*" "<" ">" "=" "%")) (assignment-operator (or "+=" "-=" "*=" "/=" "//=" "%=" "**=" ">>=" "<<=" "&=" "^=" "|=" "=")) (string-delimiter (seq (or (not (any 92 39 34)) point (and (or (not (any 92)) point) 92 (* 92 92) (any 39 34))) (* 92 92) (group (or "\"\"\"" "\"" "'''" "'")))) (coding-cookie (seq line-start 35 (* space) (or (: "coding" (or 58 61) (* space) (group-n 1 (+ (or word 45)))) (: "-*-" (* space) "coding:" (* space) (group-n 1 (+ (or word 45))) (* space) "-*-") (: "vim:" (* space) "set" (+ space) "fileencoding" (* space) 61 (* space) (group-n 1 (+ (or word 45))) (* space) ":"))))) rx] 5 (#$ . 3988)])) #@40 (fn FORM TYPE &optional SYNTAX-PPSS) (defalias 'python-syntax--context-compiler-macro #[770 "\300\267\202)\301\302\303\304BBDC\305BB\207\301\302\303\306BBDC\307BB\207\310\311\303\312BBE\207\207" [#s(hash-table size 3 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ('comment 6 'string 19 'paren 32)) let ppss or ((syntax-ppss)) ((and (nth 4 ppss) (nth 8 ppss))) ((syntax-ppss)) ((and (nth 3 ppss) (nth 8 ppss))) nth 1 ((syntax-ppss))] 8 (#$ . 5747)]) #@195 Return non-nil if point is on TYPE using SYNTAX-PPSS. TYPE can be `comment', `string' or `paren'. It returns the start character address of the specified TYPE. (fn TYPE &optional SYNTAX-PPSS) (defalias 'python-syntax-context #[513 "\211\206\300 \301\267\202$\3028\205%\3038\207\3048\205%\3038\207\211A@\207\305\207" [syntax-ppss #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (comment 12 string 22 paren 32)) 4 8 3 nil] 5 (#$ . 6232)]) (byte-code "\300\301\302\303#\300\207" [function-put python-syntax-context compiler-macro python-syntax--context-compiler-macro] 4) #@129 Return the context type using SYNTAX-PPSS. The type returned can be `comment', `string' or `paren'. (fn &optional SYNTAX-PPSS) (defalias 'python-syntax-context-type #[256 "\211\206\300 \3018\203\3028\203\303\207\304\207\211A@\205\305\207" [syntax-ppss 8 4 comment string paren] 4 (#$ . 6857)]) #@74 Return non-nil if PPSS is inside comment or string. (fn &optional PPSS) (defalias 'python-syntax-comment-or-string-p #[256 "\300\206\301 8\207" [8 syntax-ppss] 3 (#$ . 7168)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put python-syntax-comment-or-string-p speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@56 Return non-nil if char after point is a closing paren. (defalias 'python-syntax-closing-paren-p #[0 "\300\301\302`!!\301\303!\"\207" [eql syntax-class syntax-after (5)] 4 (#$ . 7513)]) (byte-code "\300\301\302\303#\304\301\305\306#\210\307\310\311\312#\210\313\310\311\314#\210\307\315\316\312#\210\313\315\316\314#\210\307\317\320\312#\210\313\317\320\314#\207" [function-put python-syntax-closing-paren-p speed -1 put byte-optimizer byte-compile-inline-expand defalias python-info-ppss-context python-syntax-context nil make-obsolete "24.3" python-info-ppss-context-type python-syntax-context-type python-info-ppss-comment-or-string-p python-syntax-comment-or-string-p] 5) #@48 Return syntactic face given STATE. (fn STATE) (defalias 'python-font-lock-syntactic-face-function #[257 "\3038\203\304!\203\207 \207\n\207" [font-lock-doc-face font-lock-string-face font-lock-comment-face 3 python-info-docstring-p] 3 (#$ . 8194)]) #@82 Return non-nil if the pos where PPSS was found is inside an f-string. (fn PPSS) (defalias 'python--f-string-p #[257 "\3008\205$\3018S\211f\302>\205\"eW\206\"\211\206`Sfz\303>?\262\207" [3 8 (102 70) (119 95)] 4 (#$ . 8456)]) #@160 Mark {...} holes as being code. Remove the (presumably `font-lock-string-face') `face' property from the {...} holes that appear within f-strings. (fn LIMIT) (defalias 'python--font-lock-f-strings #[257 "\301 \302!\204\303\304\305#\203\301 \262\202`W\205|\212\3068b\210\30716\310\311\312!\210)`S^0\2028\210)\303\313\314#\203o\310f\315=\203N\312u\210\2029\316\224\3171_\320\312!\210`^0\202a\210\211b\210\321\322\310$\266\2029T^b\210\301 \266\202\202\207" [forward-sexp-function syntax-ppss python--f-string-p re-search-forward "\\" "\\_<\\(?:__\\(?:\\(?:a\\(?:ll\\|nnotations\\)\\|c\\(?:\\(?:losur\\|od\\)e\\)\\|d\\(?:efaults\\|ict\\|oc\\)\\|globals\\|import\\|kwdefaults\\|\\(?:modul\\|nam\\|packag\\|qualnam\\)e\\)__\\)\\|a\\(?:bs\\|ll\\|ny\\|pply\\|scii\\)\\|b\\(?:asestring\\|in\\|ool\\|reakpoint\\|uffer\\|yte\\(?:array\\|s\\)\\)\\|c\\(?:allable\\|hr\\|lassmethod\\|mp\\|o\\(?:erce\\|mp\\(?:ile\\|lex\\)\\)\\)\\|d\\(?:elattr\\|i\\(?:ct\\|r\\|vmod\\)\\)\\|e\\(?:numerate\\|val\\|xec\\(?:file\\)?\\)\\|f\\(?:il\\(?:e\\|ter\\)\\|\\(?:loa\\|orma\\|rozense\\)t\\)\\|g\\(?:etattr\\|lobals\\)\\|h\\(?:as\\(?:attr\\|h\\)\\|e\\(?:lp\\|x\\)\\)\\|i\\(?:d\\|n\\(?:put\\|t\\(?:ern\\)?\\)\\|s\\(?:instance\\|subclass\\)\\|ter\\)\\|l\\(?:en\\|ist\\|o\\(?:cals\\|ng\\)\\)\\|m\\(?:a[px]\\|emoryview\\|in\\)\\|next\\|o\\(?:bject\\|ct\\|pen\\|rd\\)\\|p\\(?:ow\\|r\\(?:int\\|operty\\)\\)\\|r\\(?:a\\(?:nge\\|w_input\\)\\|e\\(?:duce\\|load\\|pr\\|versed\\)\\|ound\\)\\|s\\(?:et\\(?:attr\\)?\\|lice\\|orted\\|t\\(?:aticmethod\\|r\\)\\|u\\(?:m\\|per\\)\\)\\|t\\(?:\\(?:upl\\|yp\\)e\\)\\|unic\\(?:hr\\|ode\\)\\|vars\\|xrange\\|zip\\)\\_>" font-lock-builtin-face] 5) (#$ . 9806)) #@212 Font lock keywords to use in python-mode for maximum decoration. This decoration level includes everything in `python-font-lock-keywords-level-2', as well as constants, decorators, exceptions, and assignments. (defvar python-font-lock-keywords-maximum-decoration (byte-code "\301\302\303\304B\305\306B\307\310B\311\312B\313\314B\257\"B\207" [python-font-lock-keywords-level-2 (python--font-lock-f-strings) append "\\_<\\(?:Ellipsis\\|False\\|No\\(?:ne\\|tImplemented\\)\\|True\\|__debug__\\|c\\(?:opyright\\|redits\\)\\|exit\\|license\\|quit\\)\\_>" font-lock-constant-face "^[ ]*\\(@\\(?:[[:word:]]\\|_\\)+\\(?:\\.\\(?:[[:word:]]\\|_\\)+\\)*\\)" ((1 font-lock-type-face)) "\\_<\\(?:A\\(?:\\(?:rithmetic\\|ssertion\\|ttribute\\)Error\\)\\|B\\(?:aseException\\|lockingIOError\\|rokenPipeError\\|ufferError\\|ytesWarning\\)\\|C\\(?:\\(?:hildProcess\\|onnection\\(?:Aborted\\|Re\\(?:fused\\|set\\)\\)?\\)Error\\)\\|DeprecationWarning\\|E\\(?:OFError\\|nvironmentError\\|xception\\)\\|F\\(?:ile\\(?:\\(?:Exists\\|NotFound\\)Error\\)\\|loatingPointError\\|utureWarning\\)\\|GeneratorExit\\|I\\(?:OError\\|mport\\(?:Error\\|Warning\\)\\|\\(?:n\\(?:de\\(?:ntation\\|x\\)\\|terrupted\\)\\|sADirectory\\)Error\\)\\|Key\\(?:Error\\|boardInterrupt\\)\\|LookupError\\|MemoryError\\|N\\(?:\\(?:ame\\|ot\\(?:ADirectory\\|Implemented\\)\\)Error\\)\\|O\\(?:\\(?:S\\|verflow\\)Error\\)\\|P\\(?:e\\(?:ndingDeprecationWarning\\|rmissionError\\)\\|rocessLookupError\\)\\|R\\(?:e\\(?:cursionError\\|ferenceError\\|sourceWarning\\)\\|untime\\(?:Error\\|Warning\\)\\)\\|S\\(?:t\\(?:andardError\\|op\\(?:\\(?:Async\\)?Iteration\\)\\)\\|y\\(?:ntax\\(?:Error\\|Warning\\)\\|stemE\\(?:rror\\|xit\\)\\)\\)\\|T\\(?:\\(?:ab\\|imeout\\|ype\\)Error\\)\\|U\\(?:n\\(?:boundLocalError\\|icode\\(?:DecodeError\\|E\\(?:\\(?:ncodeE\\)?rror\\)\\|TranslateError\\|Warning\\)\\)\\|serWarning\\)\\|V\\(?:\\(?:MS\\|alue\\)Error\\)\\|W\\(?:arning\\|indowsError\\)\\|ZeroDivisionError\\)\\_>" font-lock-type-face #[257 "\300\301\302\303#\211\262\203\304 A@\204`f\305=\204\207" ["\\([_[:alpha:]][_[:word:]]*\\)\\(?:\\[[^]]+]\\)?[[:space:]]*\\(?::[[:space:]]*[^%&*+/<->^|~-]+[[:space:]]*\\)?\\(?:\\(?:\\*\\*\\|//\\|<<\\|>>\\|[%&*+/|^-]\\)?=\\)" nil re-search-forward t syntax-ppss 61] 7 "\n\n(fn LIMIT)"] ((1 font-lock-variable-name-face nil nil)) #[257 "\300\301\302\303#\211\262\203\304\225b\203\305 A@\204\207" ["\\([_[:alpha:]][_[:word:]]*\\)[[:space:]]*\\(?:,[[:space:]]*[_[:alpha:]][_[:word:]]*[[:space:]]*\\)*,[[:space:]]*[_[:alpha:]][_[:word:]]*[[:space:]]*\\(?:\\(?:\\*\\*\\|//\\|<<\\|>>\\|[%&*+/|^-]\\)?=\\)" nil re-search-forward t 1 syntax-ppss] 7 "\n\n(fn LIMIT)"] ((1 font-lock-variable-name-face nil nil))] 9) (#$ . 11574)) #@147 List of font lock keyword specifications to use in python-mode. Which one will be chosen depends on the value of `font-lock-maximum-decoration'. (defvar python-font-lock-keywords '(python-font-lock-keywords-level-1 python-font-lock-keywords-level-1 python-font-lock-keywords-level-2 python-font-lock-keywords-maximum-decoration) (#$ . 14295)) (defconst python-syntax-propertize-function #[514 "b\210`W\205\300\301\302#\205\303 \210\202\207" [re-search-forward "\\(?:\"\"\"\\|'''\\)" t python-syntax-stringify] 6 "\n\n(fn START END)"]) (byte-code "\300\301\302\303#\210\304\211\203(\211@\301N\203!\302N\204!\305\302\301N#\210A\266\202\202\210\306\301\302\307#\207" [defvaralias python--prettify-symbols-alist python-prettify-symbols-alist nil (saved-value saved-variable-comment) put make-obsolete-variable "26.1"] 7) #@54 Value for `prettify-symbols-alist' in `python-mode'. (defvar python-prettify-symbols-alist '(("lambda" . 955) ("and" . 8743) ("or" . 8744)) (#$ . 15138)) #@249 Count number of quotes around point (max is 3). QUOTE-CHAR is the quote char to count. Optional argument POINT is the point where scan starts (defaults to current point), and LIMIT is used to limit the scan. (fn QUOTE-CHAR &optional POINT LIMIT) (defalias 'python-syntax-count-quotes #[769 "\300\211\301W\203#\203\\W\203#\\f=\203#\211T\262\202\207" [0 3] 6 (#$ . 15299)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put python-syntax-count-quotes speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@64 Put `syntax-table' property correctly on single/triple quotes. (defalias 'python-syntax-stringify #[0 "\212\300u\210\301 )\3028\303=\205\3048`\302Z`\3058\204)\203+\306ff\"\204+\307\207\3108\2035Tb\207\204A\311\211T\312\313$\207\311S\312\313$\207" [-3 syntax-ppss 3 t 8 4 eql nil 5 put-text-property syntax-table (15)] 9 (#$ . 15846)]) #@32 Syntax table for Python files. (defvar python-mode-syntax-table (byte-code "\300 \301\302 \303\304\211W\203+\211\211\305U\204#H\232\203#\306\307#\210\210\211T\262\202\266\306\310\307#\210\306\311\307#\210\306\312\313#\210\306\314\315#\210\306\316\317#\210\306\320\321#\210\207" [make-syntax-table (3) standard-syntax-table 128 0 95 modify-syntax-entry "." 36 37 35 "<" 10 ">" 39 "\"" 96 "$"] 10) (#$ . 16206)) #@92 Dotty syntax table for Python files. It makes underscores and dots word constituent chars. (defvar python-dotty-syntax-table (byte-code "\301!\302\303\304#\210\302\305\304#\210\207" [python-mode-syntax-table make-syntax-table modify-syntax-entry 46 "w" 95] 5) (#$ . 16642)) (byte-code "\300\301\302\303#\210\304\211\203(\211@\301N\203!\302N\204!\305\302\301N#\210A\266\202\202\210\306\301\302\307#\210\310\302\311\312\313DD\314\315\316\317\320\321\322& \210\300\323\324\303#\210\304\211\203h\211@\323N\203a\324N\204a\305\324\323N#\210A\266\202\202G\210\306\323\324\307#\210\310\324\311\312\325DD\326\317\327\315\316\321\330& \210\310\331\311\312\332DD\333\334\335\317\327\315\316\321\330& \210\310\336\311\312\337DD\340\317\341\315\316&\210\310\342\311\312\343DD\344\334\345\317\320\321\346& \207" [defvaralias python-indent python-indent-offset nil (saved-value saved-variable-comment) put make-obsolete-variable "24.3" custom-declare-variable funcall function #[0 "\300\207" [4] 1] "Default indentation offset for Python." :group python :type integer :safe integerp python-guess-indent python-indent-guess-indent-offset #[0 "\300\207" [t] 1] "Non-nil tells Python mode to guess `python-indent-offset' value." boolean booleanp python-indent-guess-indent-offset-verbose #[0 "\300\207" [t] 1] "Non-nil means to emit a warning when indentation guessing fails." :version "25.1" python-indent-trigger-commands #[0 "\300\207" [(indent-for-tab-command yas-expand yas/expand)] 1] "Commands that might trigger a `python-indent-line' call." (repeat symbol) python-indent-def-block-scale #[0 "\300\207" [2] 1] "Multiplier applied to indentation inside multi-line def blocks." "26.1" natnump] 12) #@45 Deprecated var available for compatibility. (defvar python-indent-current-level 0 (#$ . 18357)) #@45 Deprecated var available for compatibility. (defvar python-indent-levels '(0) (#$ . 18459)) (byte-code "\300\301\302\303#\210\300\304\302\303#\207" [make-obsolete-variable python-indent-current-level "The indentation API changed to avoid global state.\nThe function `python-indent-calculate-levels' does not use it\nanymore. If you were defadvising it and or depended on this\nvariable for indentation customizations, refactor your code to\nwork on `python-indent-calculate-indentation' instead." "24.5" python-indent-levels] 4) #@62 Guess and set `python-indent-offset' for the current buffer. (defalias 'python-indent-guess-indent-offset #[0 "\212\214~\210eb\210\302\211\204S\303\304\302\305#\203S\306 \204\307 b\210\310\311!\210`Sf\312=\204L\313y\210\314 \203\315 \203@m\204@\313y\210\2021\310\311!\210`Sf\312=\203\316 \262\202\211\205_\211b\210\310 \210\317 \211\203s\211\320U\204s\321\300!\210\211\211\202{ \205{\322\323\"\262\262*\207" [python-indent-offset python-indent-guess-indent-offset-verbose nil re-search-forward "^\\_<\\(?:def\\|class\\|if\\|elif\\|else\\|try\\|except\\|finally\\|for\\|while\\|with\\|async[[:space:]]+\\(?:def\\|for\\|with\\)\\)\\_>" t python-syntax-context-type line-end-position python-util-forward-comment -1 58 1 python-info-block-continuation-line-p python-info-continuation-line-p point-marker current-indentation 0 make-local-variable message "Can't guess python-indent-offset, using defaults: %s"] 5 (#$ . 18995) nil]) #@2379 Get information about the current indentation context. Context is returned in a cons with the form (STATUS . START). STATUS can be one of the following: keyword ------- :after-comment - Point is after a comment line. - START is the position of the "#" character. :inside-string - Point is inside string. - START is the position of the first quote that starts it. :no-indent - No possible indentation case matches. - START is always zero. :inside-paren - Fallback case when point is inside paren. - START is the first non space char position *after* the open paren. :inside-paren-at-closing-nested-paren - Point is on a line that contains a nested paren closer. - START is the position of the open paren it closes. :inside-paren-at-closing-paren - Point is on a line that contains a paren closer. - START is the position of the open paren. :inside-paren-newline-start - Point is inside a paren with items starting in their own line. - START is the position of the open paren. :inside-paren-newline-start-from-block - Point is inside a paren with items starting in their own line from a block start. - START is the position of the open paren. :after-backslash - Fallback case when point is after backslash. - START is the char after the position of the backslash. :after-backslash-assignment-continuation - Point is after a backslashed assignment. - START is the char after the position of the backslash. :after-backslash-block-continuation - Point is after a backslashed block continuation. - START is the char after the position of the backslash. :after-backslash-dotted-continuation - Point is after a backslashed dotted continuation. Previous line must contain a dot to align with. - START is the char after the position of the backslash. :after-backslash-first-line - First line following a backslashed continuation. - START is the char after the position of the backslash. :after-block-end - Point is after a line containing a block ender. - START is the position where the ender starts. :after-block-start - Point is after a line starting a block. - START is the position where the block starts. :after-line - Point is after a simple line. - START is the position where the previous line starts. :at-dedenter-block-start - Point is on a line starting a dedenter block. - START is the position where the dedenter block starts. (defalias 'python-indent-context #[0 "\212\300 \210\301 )\302 \303U\203\304\305B\207\211\206\301 \3068\205!\3078\262\211\2053\310 \2030\311\2021\312B\262\206\341\211\206>\301 A@\211\205U\212\211b\210\313u\210\302 \314 \210\302 U)?\205\317\212\315\316!\210\317\320\321`!!\320\322!\"\205y\303u\210\301 A@?\205y\323B)\206\317\212\324 \210\317\320\321`!!\320\322!\")\203\227\325B\266\202\202\321\212b\210\211\205\255\212\324 \210\326\327!)\205\255\330B)\206\317\211\203\275\331B\266\202\202\321\332\212Tb\210\315\333\303\"\210\315\316!\210`)B\266\202\206\341\211\307\206\334\301 8\262?\205\350\334\302 S!\211\205v\212\324 \210\313f\335=\205'\336y\210o\204\301 A@\204\367\337 b\210\340\341\342 \343#\203\344 \204 \313f\335=\205'\344 ?\205'\345`B)\206v\346 \211\205@\212\211b\210\347\350\337 \343#\210\351`)B\262\206v\352 \211\205S\212\211b\210\353`)B\262\206v\212\211b\210\302 \303U\204l\354\302 S!?\205o\355B)\206v\356B\262\206\341\212\324 \210\314\336!\210`Sf\357=\205\215\360 )\211\205\225\361B\262\206\341\362 \211\205\243\363B\262\206\341\212\324 \210\364\313x\210o\203\272\304\305B\202\340\365 \210\366 \203\306\367\202\336\212\337 b\210\314\336!\210\365 \210\326\370!)\203\335\371\202\336\372`B)\207" [beginning-of-line syntax-ppss line-number-at-pos 1 :no-indent 0 3 8 python-info-docstring-p :inside-docstring :inside-string nil python-util-forward-comment skip-syntax-forward " " eql syntax-class syntax-after (5) :inside-paren-at-closing-paren back-to-indentation :inside-paren-at-closing-nested-paren looking-at "\\_<\\(?:def\\|class\\|if\\|elif\\|else\\|try\\|except\\|finally\\|for\\|while\\|with\\|async[[:space:]]+\\(?:def\\|for\\|with\\)\\)\\_>" :inside-paren-newline-start-from-block :inside-paren-newline-start :inside-paren "(" python-info-line-ends-backslash-p 46 -1 line-end-position search-backward "." line-beginning-position t python-syntax-context-type :after-backslash-dotted-continuation python-info-block-continuation-line-p re-search-forward "\\_<\\(?:def\\|class\\|if\\|elif\\|else\\|try\\|except\\|finally\\|for\\|while\\|with\\|async[[:space:]]+\\(?:def\\|for\\|with\\)\\)\\_>[[:space:]]*" :after-backslash-block-continuation python-info-assignment-continuation-line-p :after-backslash-assignment-continuation python-info-beginning-of-backslash :after-backslash-first-line :after-backslash 58 python-nav-beginning-of-block :after-block-start python-info-dedenter-statement-p :at-dedenter-block-start " \n" python-nav-beginning-of-statement python-info-current-line-comment-p :after-comment "\\_<\\(?:break\\|continue\\|pass\\|r\\(?:aise\\|eturn\\)\\)\\_>" :after-block-end :after-line] 7 (#$ . 19954)]) #@312 Internal implementation of `python-indent-calculate-indentation'. May return an integer for the maximum possible indentation at current context or a list of integers. The latter case is only happening for :at-dedenter-block-start context since the possibilities can be narrowed to specific indentation points. (defalias 'python-indent--calculate-indentation #[0 "\212\302 \211:\205\256\211\242\211\303\267\202\253\304 \202\254\243\211\211b\210\305 \262\262\202\254\243\211\211Tb\210\306\307!\2036\305 \2027i\262\262\202\254\243\211\305 b\210\305 ]\266\202\262\262\202\254\243\211\211b\210\305 \\\262\262\202\254\243\211\211b\210i\262\262\202\254\243\211\211b\210\305 Z\262\262\202\254\310 \211\204\217\304 \202\223\311\312\"\262\202\254\243\211\211b\210\305  _\\\262\262\202\254\313\262\262)\207" [python-indent-offset python-indent-def-block-scale python-indent-context #s(hash-table size 18 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:no-indent 16 :after-backslash 21 :inside-string 21 :after-comment 21 :after-line 21 :inside-paren-at-closing-nested-paren 36 :inside-paren-at-closing-paren 36 :inside-docstring 62 :inside-paren-newline-start 84 :after-backslash-assignment-continuation 84 :after-backslash-first-line 84 :after-block-start 84 :after-backslash-dotted-continuation 101 :after-backslash-block-continuation 101 :inside-paren 101 :after-block-end 115 :at-dedenter-block-start 132 :inside-paren-newline-start-from-block 152)) prog-first-column current-indentation looking-at "[ ]*\\(?:#\\|$\\)" python-info-dedenter-opening-block-positions mapcar #[257 "\212\211b\210\300 )\207" [current-indentation] 2 "\n\n(fn POS)"] nil] 8 (#$ . 25049)]) #@233 Calculate levels list given INDENTATION. Argument INDENTATION can either be an integer or a list of integers. Levels are returned in ascending order, and in the case INDENTATION is a list, this order is enforced. (fn INDENTATION) (defalias 'python-indent--calculate-levels #[257 "\211<\203\f\301\302!\303\"\207\304\305 S#C\244\207" [python-indent-offset sort copy-sequence < number-sequence prog-first-column] 5 (#$ . 26780)]) #@85 Return previous level from LEVELS relative to INDENTATION. (fn LEVELS INDENTATION) (defalias 'python-indent--previous-level #[514 "\300\301!\302\"\211@\3032(\211\203%\211@\211W\203\304\303\"\210A\266\202\202 \210\2110\207" [sort copy-sequence > return throw] 9 (#$ . 27220)]) #@181 Calculate indentation. Get indentation of PREVIOUS level when argument is non-nil. Return the max level of the cycle when indentation reaches the minimum. (fn &optional PREVIOUS) (defalias 'python-indent-calculate-indentation #[256 "\300 \301!\203\302\303 \"\207\211\203\304\305\"\207\306 \207" [python-indent--calculate-indentation python-indent--calculate-levels python-indent--previous-level current-indentation apply max prog-first-column] 6 (#$ . 27514)]) #@282 Internal implementation of `python-indent-line-function'. Use the PREVIOUS level when argument is non-nil, otherwise indent to the maximum available level. When indentation is the minimum possible and PREVIOUS is non-nil, cycle back to the maximum level. (fn &optional PREVIOUS) (defalias 'python-indent-line #[256 "\300 `X\205\300 \301 \\`Y\212\302\303!!\210\304 \210)\211\205\305 \207" [line-beginning-position current-indentation indent-line-to python-indent-calculate-indentation python-info-dedenter-opening-block-message back-to-indentation] 5 (#$ . 27991)]) #@37 Return possible indentation levels. (defalias 'python-indent-calculate-levels #[0 "\300\301 !\207" [python-indent--calculate-levels python-indent--calculate-indentation] 2 (#$ . 28569)]) #@203 `indent-line-function' for Python mode. When the variable `last-command' is equal to one of the symbols inside `python-indent-trigger-commands' it cycles possible indentation levels from right to left. (defalias 'python-indent-line-function #[0 "\303 >\205\n\n=!\207" [this-command python-indent-trigger-commands last-command python-indent-line] 3 (#$ . 28763)]) #@25 De-indent current line. (defalias 'python-indent-dedent-line #[0 "n?\205 \300\301\206 \302 8\262?\205 \303 iU\205 \304\305!\210\305\207" [nil 8 syntax-ppss current-indentation python-indent-line t] 3 (#$ . 29135) "*"]) #@139 De-indent current line. Argument ARG is passed to `backward-delete-char-untabify' when point is not in between the indentation. (fn ARG) (defalias 'python-indent-dedent-line-backspace #[257 "\300 ?\205 \301!\207" [python-indent-dedent-line backward-delete-char-untabify] 3 (#$ . 29367) "*p"]) (put 'python-indent-dedent-line-backspace 'delete-selection 'supersede) #@123 Indent a Python region automagically. Called from a program, START and END specify the region to indent. (fn START END) (defalias 'python-indent-region #[514 "\301\212\211b\210\302 \262b\210n\204\303y\210`W\203\232n\203\"l\204\224\212\304 \305y\210\304 \2032\211?\2064\306 ?\262)\203\224\307 \3108\205F\3118\262\203\206\312`S\313 \\\301f`\301\314\211\310W\203x\203h\\W\203x\\f=\203x\211T\262\202V\266\203\\!\315=\204\206\316 \203\224\212\317 \210\320\321!)\204\224\322 \210\303y\210\202\211\301\211\223*\207" [deactivate-mark nil point-marker 1 python-info-current-line-comment-p -1 python-info-current-line-empty-p syntax-ppss 3 8 syntax-after current-indentation 0 (15) python-info-docstring-p back-to-indentation looking-at "\\_<\\(?:def\\|class\\|if\\|elif\\|else\\|try\\|except\\|finally\\|for\\|while\\|with\\|async[[:space:]]+\\(?:def\\|for\\|with\\)\\)\\_>\\|\\_<\\(?:e\\(?:l\\(?:if\\|se\\)\\|xcept\\)\\|finally\\)\\_>\\|\\_<\\(?:break\\|continue\\|pass\\|r\\(?:aise\\|eturn\\)\\)\\_>" python-indent-line] 10 (#$ . 29742)]) #@355 Shift lines contained in region START END by COUNT columns to the left. COUNT defaults to `python-indent-offset'. If region isn't active, the current line is shifted. The shifted region includes the lines in which START and END lie. An error is signaled if any lines in the region are indented less than COUNT columns. (fn START END &optional COUNT) (defalias 'python-indent-shift-left #[770 "\211\203\f\302!\262\202\262\211\303V\205?\304\212b\210`W\2038\305 W\2032\306\307!\2042\310\311!\210\304y\210\202\312[#*\207" [python-indent-offset deactivate-mark prefix-numeric-value 0 nil current-indentation looking-at "[ ]*$" user-error "Can't shift all lines enough" indent-rigidly] 7 (#$ . 30819) (byte-code "\203 \302 \303 E\207\304 \305 E\207" [mark-active current-prefix-arg region-beginning region-end line-beginning-position line-end-position] 3)]) #@269 Shift lines contained in region START END by COUNT columns to the right. COUNT defaults to `python-indent-offset'. If region isn't active, the current line is shifted. The shifted region includes the lines in which START and END lie. (fn START END &optional COUNT) (defalias 'python-indent-shift-right #[770 "\302\211\203\f\303!\202 \262\304#)\207" [deactivate-mark python-indent-offset nil prefix-numeric-value indent-rigidly] 7 (#$ . 31707) (byte-code "\203 \302 \303 E\207\304 \305 E\207" [mark-active current-prefix-arg region-beginning region-end line-beginning-position line-end-position] 3)]) #@240 Adjust indentation after insertion of some characters. This function is intended to be added to `post-self-insert-hook.' If a line renders a paren alone, after adding a char before it, the line will be re-indented automatically if needed. (defalias 'python-indent-post-self-insert-function #[0 "\205\321`Sf =\205\321\304 \3058\205\3068\262?\205\321\212\307 \210\304 \206(\304 \3058\2051\3068\262)?\205\321n\204y\304 A@\211\205K\310 \310!U?\262\203y\311f\312>\204_`Sf\313=\203y\212\314 b\210\315 \211\247\205u\316 W\205u\317!\262)\207 \320=\205\321\320\n>\205\321 ?\205\321l\205\321`S\206\224`Sf\320=?\205\321\311\306\206\244\304 8\262?\205\321\321 \211\205\317\322!\323 \212b\210\324 \210\310!\310!U?\205\314\325\")\266\202\262\207" [electric-indent-mode last-command-event electric-indent-chars current-prefix-arg syntax-ppss 3 8 beginning-of-line line-number-at-pos nil (41 93 125) 44 line-beginning-position python-indent-calculate-indentation current-indentation indent-line-to 58 python-info-dedenter-statement-p copy-marker point-marker python-indent-line python-indent-region] 6 (#$ . 32330)]) #@328 Put mark at end of this defun, point at beginning. The defun marked is the one that contains point or follows point. Interactively (or with ALLOW-EXTEND non-nil), if this command is repeated or (in Transient Mark mode) if the mark is active, it marks the next defun after the ones already marked. (fn &optional ALLOW-EXTEND) (defalias 'python-mark-defun #[256 "\300 \203\301\210\302!\207" [python-info-looking-at-beginning-of-defun 1 mark-defun] 3 (#$ . 33484) "p"]) #@130 Regexp matching class or function definition. The name of the defun should be grouped so it can be retrieved via `match-string'. (defvar python-nav-beginning-of-defun-regexp "^[[:space:]]*\\_<\\(?:def\\|class\\|async[[:space:]]+def\\)\\_>[[:space:]]+\\([_[:alpha:]][_[:word:]]*\\)" (#$ . 33964)) #@139 Internal implementation of `python-nav-beginning-of-defun'. With positive ARG search backwards, else search forwards. (fn &optional ARG) (defalias 'python-nav--beginning-of-defun #[256 "\211\203\n\211\302U\203 \303\262\211\302V\203\304\202\305\306 \211\307 \\\310 \302V\205?\212\311 \2041\312 \204'\311 \203=\307 \\\206>\302)\302W\203M\311 \203M\303\210 \313\314#\203n\315 \204M\302V\203n\307 \302U\204n\307 Y\204M\311 \205\214\316!\316 U?\206\214`Y\205\214`X\205\214V\211\203\230\317\303!\206\234\314\207b\210\313\207" [python-indent-offset python-nav-beginning-of-defun-regexp 0 1 re-search-backward re-search-forward line-beginning-position current-indentation point-marker python-info-looking-at-beginning-of-defun python-nav-backward-block nil t python-syntax-context-type line-number-at-pos beginning-of-line] 10 (#$ . 34267)]) #@300 Move point to `beginning-of-defun'. With positive ARG search backwards else search forward. ARG nil or 0 defaults to 1. When searching backwards, nested defuns are handled with care depending on current point position. Return non-nil if point is moved to `beginning-of-defun'. (fn &optional ARG) (defalias 'python-nav-beginning-of-defun #[256 "\211\203\n\211\300U\203 \301\262\302\300U\204:\303!\211\203\"\204\"\304\262\211\262\203:\300V\2033S\2025T\262\202\207" [0 1 nil python-nav--beginning-of-defun t] 4 (#$ . 35147)]) #@87 Move point to the end of def or class. Returns nil if point is not in a def or class. (defalias 'python-nav-end-of-defun #[0 "\300`\301 \204\302\303!\204\302\304!\2058\305 \262\306 \210\307\303!\210\305 V\203)m\203\307\304!\210\303y\210\211`V\2058\211b\207" [nil python-info-looking-at-beginning-of-defun python-nav-beginning-of-defun 1 -1 current-indentation python-nav-end-of-statement python-util-forward-comment] 4 (#$ . 35699) nil]) #@473 Move point using FN avoiding places with specific context. FN must take no arguments. POSCOMPFN is a two arguments function used to compare current and previous point after it is moved using FN, this is normally a less-than or greater-than comparison. Optional argument CONTEXTFN defaults to `python-syntax-context-type' and is used for checking current point context, it must return a non-nil value if this point must be skipped. (fn FN POSCOMPFN &optional CONTEXTFN) (defalias 'python-nav--syntactically #[770 "\211\206\300\301 \302\3032] \205\301  \211\204?\203?\204%\2045\203?\203?\"\203?\304\303\301 \"\266\202\f\203M\211\203M`\266\203\202\f\204Tb\210\304\303\302\"\266\202\f\207" [python-syntax-context-type point-marker nil found throw] 11 (#$ . 36155)]) #@148 Internal implementation of python-nav-{backward,forward}-defun. Uses ARG to define which function to call, and how many times repeat it. (fn ARG) (defalias 'python-nav--forward-defun #[257 "\300\301V\203\302\303\304\"\211\262\203S\262\202\301W\203/\302\305\306\"\211\262\203/T\262\202\207" [nil 0 python-nav--syntactically #[0 "\301\302\303#\207" [python-nav-beginning-of-defun-regexp re-search-forward nil t] 4] > #[0 "\301\302\303#\207" [python-nav-beginning-of-defun-regexp re-search-backward nil t] 4] <] 5 (#$ . 36961)]) #@151 Navigate to closer defun backward ARG times. Unlikely `python-nav-beginning-of-defun' this doesn't care about nested definitions. (fn &optional ARG) (defalias 'python-nav-backward-defun #[256 "\300\206\301[!\207" [python-nav--forward-defun 1] 3 (#$ . 37515) "^p"]) #@150 Navigate to closer defun forward ARG times. Unlikely `python-nav-beginning-of-defun' this doesn't care about nested definitions. (fn &optional ARG) (defalias 'python-nav-forward-defun #[256 "\300\206\301!\207" [python-nav--forward-defun 1] 3 (#$ . 37791) "^p"]) #@37 Move to start of current statement. (defalias 'python-nav-beginning-of-statement #[0 "\300y\210\301 \211\206 \301 A@\206!\211\206\301 \3028\205\3038\262o\204C\211\2033\211b\210\304 \266\202E\212\305y\210\306 )\203C\305y\210\304 \210\266\307 \210\310 \207" [0 syntax-ppss 3 8 python-nav-beginning-of-statement -1 python-info-line-ends-backslash-p back-to-indentation point-marker] 4 (#$ . 38063) "^"]) #@204 Move to end of current statement. Optional argument NOEND is internal and makes the logic to not jump to the end of line when moving forward searching for the end of the statement. (fn &optional NOEND) (defalias 'python-nav-end-of-statement #[256 "\300\211\211\204 \301 b\203\237m\204\237\302 \3038\205\3048\262\211\262\203qb\210\302 A@\2034\305\306!\202\234``f`\300\307\211\303W\203\\\203L\\W\203\\\\f=\203\\\211T\262\202:\266\203\\b\210\310\311\300\306#\206kdb\211\262\202\234\302 A@\203\217\3121\206\313`\314\315#b0\202\234\3038b\262\202\234\316 \211\262\203\237b\210\314y\204\266\317 \207" [nil line-end-position syntax-ppss 3 8 python-nav-end-of-statement t 0 re-search-forward "\\s|" (scan-error) scan-lists 1 -1 python-info-line-ends-backslash-p point-marker] 11 (#$ . 38486) "^"]) #@113 Move backward to previous statement. With ARG, repeat. See `python-nav-forward-statement'. (fn &optional ARG) (defalias 'python-nav-backward-statement #[256 "\211\204\300\262\301[!\207" [1 python-nav-forward-statement] 3 (#$ . 39325) "^p"]) #@143 Move forward to next statement. With ARG, repeat. With negative argument, move ARG times backward to previous statement. (fn &optional ARG) (defalias 'python-nav-forward-statement #[256 "\211\204\300\262\211\301V\203\302 \210\303 \210\304 \210\211S\262\202\211\301W\2054\304 \210\303\305!\210\304 \210\211T\262\202\207" [1 0 python-nav-end-of-statement python-util-forward-comment python-nav-beginning-of-statement -1] 3 (#$ . 39579) "^p"]) #@33 Move to start of current block. (defalias 'python-nav-beginning-of-block #[0 "`\301 \210\302\303!\203 \304 \207o\204$\301 \210\305 \204\306 \203$\307y\210\202 \310 Z\311 \2034\310 V\204(\302\303!\203D\310 U\203D\304 \207b\210\312\207" [python-indent-offset python-nav-beginning-of-statement looking-at "\\_<\\(?:def\\|class\\|if\\|elif\\|else\\|try\\|except\\|finally\\|for\\|while\\|with\\|async[[:space:]]+\\(?:def\\|for\\|with\\)\\)\\_>" point-marker python-info-current-line-comment-p python-info-current-line-empty-p -1 current-indentation python-nav-backward-block nil] 4 (#$ . 40040) "^"]) #@31 Move to end of current block. (defalias 'python-nav-end-of-block #[0 "\300 \2054\301 \302 \210\303y\203,m\204,\301 V\203\"\302 \204\n\202\n\304 \204\n\305 \204\n\306\307!\210\310 \262\207" [python-nav-beginning-of-block current-indentation python-nav-end-of-statement 1 python-info-current-line-comment-p python-info-current-line-empty-p python-util-forward-comment -1 point-marker] 3 (#$ . 40657) "^"]) #@113 Move backward to previous block of code. With ARG, repeat. See `python-nav-forward-block'. (fn &optional ARG) (defalias 'python-nav-backward-block #[256 "\211\204\300\262\301[!\207" [1 python-nav-forward-block] 3 (#$ . 41078) "^p"]) #@143 Move forward to next block of code. With ARG, repeat. With negative argument, move ARG times backward to previous block. (fn &optional ARG) (defalias 'python-nav-forward-block #[256 "\211\204\300\262\301`\302V\203&\303 \210\304\305\306#\203\307 \204S\262\202 \302W\203C\310 \210\311\305\306#\203<\307 \204/T\262\202&\310 \210\312\313!\204Q\211b\210\305\207`U?\205Z\314 \207" [1 "^[[:space:]]*\\_<\\(?:def\\|class\\|if\\|elif\\|else\\|try\\|except\\|finally\\|for\\|while\\|with\\|async[[:space:]]+\\(?:def\\|for\\|with\\)\\)\\_>" 0 python-nav-end-of-statement re-search-forward nil t python-syntax-context-type python-nav-beginning-of-statement re-search-backward looking-at "\\_<\\(?:def\\|class\\|if\\|elif\\|else\\|try\\|except\\|finally\\|for\\|while\\|with\\|async[[:space:]]+\\(?:def\\|for\\|with\\)\\)\\_>" point-marker] 7 (#$ . 41324) "^p"]) #@233 Standard version `forward-sexp'. It ignores completely the value of `forward-sexp-function' by setting it to nil before calling `forward-sexp'. With positive ARG move forward only one sexp, else move backwards. (fn &optional ARG) (defalias 'python-nav--lisp-forward-sexp #[256 "\301\203 \302V\203\303\202\304\305!)\207" [forward-sexp-function nil 0 1 -1 forward-sexp] 5 (#$ . 42207)]) #@232 Safe version of standard `forward-sexp'. When at end of sexp (i.e. looking at an opening/closing paren) skips it instead of throwing an error. With positive ARG move forward only one sexp, else move backwards. (fn &optional ARG) (defalias 'python-nav--lisp-forward-sexp-safe #[256 "\211\203\n\211\300V\203\301\202\302\211\300V\203\303\202\304\300V\203$\305\202%\306\3071.\310!0\207\210\211\311\312#\205A\313 A@\205A\202/\207" [0 1 -1 "[])}]" "[([{]" re-search-forward re-search-backward (error) python-nav--lisp-forward-sexp nil t syntax-ppss] 8 (#$ . 42611)]) #@370 Move to forward sexp. With positive optional argument DIR direction move forward, else backwards. When optional argument SAFE is non-nil do not throw errors when at end of sexp, skip it instead. With optional argument SKIP-PARENS-P force sexp motion to ignore parenthesized expressions when looking at them in either direction. (fn &optional DIR SAFE SKIP-PARENS-P) (defalias 'python-nav--forward-sexp #[768 "\206\301\262\302U?\205\302V\203\301\211\262\205#\303\202#\304\262\305\306 \211\307>\2032\305\310!)\207\204a\211\311=\204U\203J\312\313`!!\314=\202R\312\313`S!!\315=\203a\203]\316!\207\317!\207\320 \203j\321\202\202\322 \203s\323\202\202\324 \203|\325\202\202\326 \205\202\327\212\203\217\316!\210\202\224\317!\210`)\212\211b\210\320 \203\243\321\202\315\322 \203\254\323\202\315\324 \203\265\325\202\315\326 \203\276\327\202\315\330 \203\307\331\202\315\332 \205\315\333)\203(m\204\351\334 \203\351\335!\210\336#\207\337\267\202\365\340 \207\341 \207\342>\203\211\333=\203b\210\340 \207\343>\203\211\331=\203b\210\340 \207\344>\203%b\210\341 \207b\207o\204?\334 \203?\335!\210\336#\207\345\267\202K\346 \207\347 \207\350>\203]\211\331=\203]b\210\346 \207\351>\203o\211\333=\203ob\210\346 \207\352>\203{b\210\347 \207b\266\205\207" [forward-sexp-function 1 0 t -1 nil python-syntax-context-type (string comment) forward-sexp paren syntax-class syntax-after 4 5 python-nav--lisp-forward-sexp-safe python-nav--lisp-forward-sexp python-info-beginning-of-block-p block-start python-info-end-of-block-p block-end python-info-beginning-of-statement-p statement-start python-info-end-of-statement-p statement-end python-info-statement-starts-block-p starts-block python-info-statement-ends-block-p ends-block python-info-current-line-empty-p python-util-forward-comment python-nav--forward-sexp #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (block-start 239 statement-start 242)) python-nav-end-of-block python-nav-end-of-statement (statement-end block-end) (statement-end block-end) (statement-end block-end) #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (block-end 325 statement-end 328)) python-nav-beginning-of-block python-nav-beginning-of-statement (statement-start block-start) (statement-start block-start) (statement-start block-start)] 12 (#$ . 43199)]) #@419 Move forward across expressions. With ARG, do it that many times. Negative arg -N means move backward N times. When optional argument SAFE is non-nil do not throw errors when at end of sexp, skip it instead. With optional argument SKIP-PARENS-P force sexp motion to ignore parenthesized expressions when looking at them in either direction (forced to t in interactive calls). (fn &optional ARG SAFE SKIP-PARENS-P) (defalias 'python-nav-forward-sexp #[768 "\204\301\262\211\204\302\303\304\305\306\305\257>\262\307V\203*\310\301#\210S\262\202\307W\205=\310\311#\210T\262\202*\207" [real-this-command 1 forward-sexp backward-sexp python-nav-forward-sexp python-nav-backward-sexp python-nav-forward-sexp-safe 0 python-nav--forward-sexp -1] 10 (#$ . 45659) "^p"]) #@419 Move backward across expressions. With ARG, do it that many times. Negative arg -N means move forward N times. When optional argument SAFE is non-nil do not throw errors when at end of sexp, skip it instead. With optional argument SKIP-PARENS-P force sexp motion to ignore parenthesized expressions when looking at them in either direction (forced to t in interactive calls). (fn &optional ARG SAFE SKIP-PARENS-P) (defalias 'python-nav-backward-sexp #[768 "\204\300\262\301[#\207" [1 python-nav-forward-sexp] 7 (#$ . 46454) "^p"]) #@323 Move forward safely across expressions. With ARG, do it that many times. Negative arg -N means move backward N times. With optional argument SKIP-PARENS-P force sexp motion to ignore parenthesized expressions when looking at them in either direction (forced to t in interactive calls). (fn &optional ARG SKIP-PARENS-P) (defalias 'python-nav-forward-sexp-safe #[512 "\300\301#\207" [python-nav-forward-sexp t] 6 (#$ . 47003) "^p"]) #@323 Move backward safely across expressions. With ARG, do it that many times. Negative arg -N means move forward N times. With optional argument SKIP-PARENS-P force sexp motion to ignore parenthesized expressions when looking at them in either direction (forced to t in interactive calls). (fn &optional ARG SKIP-PARENS-P) (defalias 'python-nav-backward-sexp-safe #[512 "\300\301#\207" [python-nav-backward-sexp t] 6 (#$ . 47446) "^p"]) #@145 Internal implementation of `python-nav-up-list'. DIR is always 1 or -1 and comes sanitized from `python-nav-up-list' calls. (fn &optional DIR) (defalias 'python-nav--up-list #[256 "\301 \302V\303>\206\212\304=\203\305\306!)\207\211\203Q\307 \203Q\212\310 \205)\311 \211\203?\211\302V\203?\311 Y\203?\312 \204)\313 \262)\211\206I``V\205P\211b\207\211\203X\313 \207\211\204\203\311 \302V\203\203\314 \203\203\212\311 \312 \203w\311 Y\204k\210`)`V\205\202\211b\207\211?\205\212\310 \207" [forward-sexp-function python-syntax-context-type 0 (string comment) paren nil up-list python-info-end-of-block-p python-nav-beginning-of-block current-indentation python-nav-backward-block python-nav-end-of-block python-info-beginning-of-block-p] 6 (#$ . 47891)]) #@243 Move forward out of one level of parentheses (or blocks). With ARG, do this that many times. A negative argument means move backward but still to a less deep spot. This command assumes point is not in a string or comment. (fn &optional ARG) (defalias 'python-nav-up-list #[256 "\211\204\300\262\211\301V\203\302\300!\210\211S\262\202\211\301W\205)\302\303!\210\211T\262\202\207" [1 0 python-nav--up-list -1] 3 (#$ . 48678) "^p"]) #@243 Move backward out of one level of parentheses (or blocks). With ARG, do this that many times. A negative argument means move forward but still to a less deep spot. This command assumes point is not in a string or comment. (fn &optional ARG) (defalias 'python-nav-backward-up-list #[256 "\211\204\300\262\301[!\207" [1 python-nav-up-list] 3 (#$ . 49128) "^p"]) #@136 Move point at the beginning the __main__ block. When "if __name__ == \='__main__\=':" is found returns its position, else returns nil. (defalias 'python-nav-if-name-main #[0 "`\3002!eb\210\301\302\303\304#\205 \305 \204\306 \210\307\300\304\"\210\2020\211\203'`\207\303b\210\207" [found re-search-forward "^if[[:space:]]+__name__[[:space:]]+==[[:space:]]+\\(?1:[\"']\\)__main__\\1[[:space:]]*:" nil t python-syntax-context-type beginning-of-line throw] 5 (#$ . 49500) nil]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \210\300\314\302\303\315DD\316\306\307\310\311&\210\300\317\302\303\320DD\321\306\307\310\311\312\313& \210\300\322\302\303\323DD\324\306\307\310\311&\210\300\325\302\303\326DD\327\306\307\330\331&\210\300\332\302\303\333DD\334\306\335\312\336\330\331& \210\300\337\302\303\340DD\341\306\335\312\336\330\331& \210\300\342\302\303\343DD\344\306\345\330\331&\210\300\346\302\303\347DD\350\306\351\330\331&\210\300\352\302\303\353DD\354\306\355%\210\300\356\302\303\357DD\360\306\355%\210\300\361\302\303\362DD\363\306\355%\210\300\364\302\303\365DD\366\306\355%\210\367\370\371\372#\210\373\211\203\347\211@\370N\203\340\371N\204\340\374\371\370N#\210A\266\202\202\306\210\375\370\371\376#\210\300\371\302\303\377DD\201@\306\335\310\311\312\336& \210\300\201A\302\303\201BDD\201C\306\335\310\311\312\336& \210\300\201D\302\303\201EDD\201F\306\201G\310\311&\210\300\201H\302\303\201IDD\201J\306\201K\310\311&\210\300\201L\302\303\201MDD\201N\306\201O\310\311&\210\300\201P\302\303\201QDD\201R\330\376\306\201S\310\311& \210\367\201T\201U\372#\210\373\211\203\252\211@\201TN\203\243\201UN\204\243\374\201U\201TN#\210A\266\202\202\201\210\375\201T\201U\376#\210\300\201U\302\303\201VDD\201W\306\201X\310\311&\210\300\201Y\302\303\201ZDD\201[\306\201\\\310\311&\210\300\201]\302\303\201^DD\201_\306\201`\310\311&\207" [custom-declare-variable python-shell-buffer-name funcall function #[0 "\300\207" [#1="Python"] 1 #1#] "Default buffer name for Python interpreter." :type string :group python :safe stringp python-shell-interpreter #[0 "\300\207" [#2="python"] 1 #2#] "Default Python interpreter for shell." python-shell-internal-buffer-name #[0 "\300\207" [#3="Python Internal"] 1 #3#] "Default buffer name for the Internal Python interpreter." python-shell-interpreter-args #[0 "\300\207" [#4="-i"] 1 #4#] "Default arguments for the Python interpreter." python-shell-interpreter-interactive-arg #[0 "\300\207" [#5="-i"] 1 #5#] "Interpreter argument to force it to run interactively." :version "24.4" python-shell-prompt-detect-enabled #[0 "\300\207" [t] 1] "Non-nil enables autodetection of interpreter prompts." boolean booleanp python-shell-prompt-detect-failure-warning #[0 "\300\207" [t] 1] "Non-nil enables warnings when detection of prompts fail." python-shell-prompt-input-regexps #[0 "\300\207" [(">>> " "\\.\\.\\. " "In \\[[0-9]+\\]: " " \\.\\.\\.: " "In : " "\\.\\.\\.: ")] 1] "List of regular expressions matching input prompts." (repeat regexp) python-shell-prompt-output-regexps #[0 "\300\207" [(#8="" "Out\\[[0-9]+\\]: " "Out :")] 1] "List of regular expressions matching output prompts." (repeat regexp) python-shell-prompt-regexp #[0 "\300\207" [#6=">>> "] 1 #6#] "Regular expression matching top level input prompt of Python shell.\nIt should not contain a caret (^) at the beginning." regexp python-shell-prompt-block-regexp #[0 "\300\207" [#7="\\.\\.\\.:? "] 1 #7#] "Regular expression matching block input prompt of Python shell.\nIt should not contain a caret (^) at the beginning." python-shell-prompt-output-regexp #[0 "\300\207" [#8#] 1 #8#] "Regular expression matching output prompt of Python shell.\nIt should not contain a caret (^) at the beginning." python-shell-prompt-pdb-regexp #[0 "\300\207" [#9="[(<]*[Ii]?[Pp]db[>)]+ "] 1 #9#] "Regular expression matching pdb input prompt of Python shell.\nIt should not contain a caret (^) at the beginning." defvaralias python-shell-enable-font-lock python-shell-font-lock-enable nil (saved-value saved-variable-comment) put make-obsolete-variable "25.1" #[0 "\300\207" [t] 1] "Should syntax highlighting be enabled in the Python shell buffer?\nRestart the Python shell after changing this variable for it to take effect." python-shell-unbuffered #[0 "\300\207" [t] 1] "Should shell output be unbuffered?.\nWhen non-nil, this may prevent delayed and missing output in the\nPython shell. See commentary for details." python-shell-process-environment #[0 "\300\207" [nil] 1] "List of overridden environment variables for subprocesses to inherit.\nEach element should be a string of the form ENVVARNAME=VALUE.\nWhen this variable is non-nil, values are exported into the\nprocess environment before starting it. Any variables already\npresent in the current environment are superseded by variables\nset here." (repeat string) python-shell-extra-pythonpaths #[0 "\300\207" [nil] 1] "List of extra pythonpaths for Python shell.\nWhen this variable is non-nil, values added at the beginning of\nthe PYTHONPATH before starting processes. Any values present\nhere that already exists in PYTHONPATH are moved to the beginning\nof the list so that they are prioritized when looking for\nmodules." (repeat string) python-shell-exec-path #[0 "\300\207" [nil] 1] "List of paths for searching executables.\nWhen this variable is non-nil, values added at the beginning of\nthe PATH before starting processes. Any values present here that\nalready exists in PATH are moved to the beginning of the list so\nthat they are prioritized when looking for executables." (repeat string) python-shell-remote-exec-path #[0 "\300\207" [nil] 1] "List of paths to be ensured remotely for searching executables.\nWhen this variable is non-nil, values are exported into remote\nhosts PATH before starting processes. Values defined in\n`python-shell-exec-path' will take precedence to paths defined\nhere. Normally you won't use this variable directly unless you\nplan to ensure a particular set of paths to all Python shell\nexecuted through tramp connections." (repeat string) python-shell-virtualenv-path python-shell-virtualenv-root #[0 "\300\207" [nil] 1] "Path to virtualenv root.\nThis variable, when set to a string, makes the environment to be\nmodified such that shells are started within the specified\nvirtualenv." (choice (const nil) directory) python-shell-setup-codes #[0 "\300\207" [nil] 1] "List of code run by `python-shell-send-setup-code'." (repeat symbol) python-shell-compilation-regexp-alist #[0 "\300\301B\302\303B\304\305BE\207" ["^[ ]+File \"\\([^\"<]+\\)\", line \\([[:digit:]]+\\)" (1 2) " in file \\(.+\\) on line \\([[:digit:]]+\\)" (1 2) "^> \\([^\"(<]+\\)(\\([[:digit:]]+\\))[^(]+()" (1 2)] 4] "`compilation-error-regexp-alist' for inferior Python." (alist regexp)] 10) #@87 Modify PATHVAR and ensure PATHS are added only once at beginning. (fn PATHVAR PATHS) (defalias 'python-shell--add-to-path-with-priority '(macro . #[514 "\300\301\302DD\303\301\304BBB\305\301\306BBBF\207" [dolist path reverse cl-delete (:test #'string=) cl-pushnew (:test #'string=)] 9 (#$ . 56369)])) #@66 Calculate the PYTHONPATH using `python-shell-extra-pythonpaths'. (defalias 'python-shell-calculate-pythonpath #[0 "\302\303\304!\206\305\306#\307 !\211\2034\211@\310\311\312$\210\313\311\312$\203(\202+\211B\262A\266\202\202\210\314\315#\207" [path-separator python-shell-extra-pythonpaths split-string getenv "PYTHONPATH" "" omit reverse cl-delete :test string= cl-member mapconcat identity] 8 (#$ . 56681)]) #@338 Calculate `process-environment' or `tramp-remote-process-environment'. Prepends `python-shell-process-environment', sets extra pythonpaths from `python-shell-extra-pythonpaths' and sets a few virtualenv related vars. If `default-directory' points to a remote host, the returned value is intended for `tramp-remote-process-environment'. (defalias 'python-shell-calculate-process-environment #[0 "\306!\211\203 \202\f\n \205\307 !\f\211\2036\211@\310\311\"\211\242\243\211\242\243\312\"\266A\266\202\202\210 \203@\312\313\314\"\210\203K\312\315\316 \"\210\211\203Y\312\317\320\"\210\312\321\"\210\n)\207" [default-directory tramp-remote-process-environment process-environment python-shell-virtualenv-root python-shell-process-environment python-shell-unbuffered file-remote-p directory-file-name split-string "=" setenv "PYTHONUNBUFFERED" "1" "PYTHONPATH" python-shell-calculate-pythonpath "PYTHONHOME" nil "VIRTUAL_ENV" python-shell-extra-pythonpaths] 14 (#$ . 57115)]) #@367 Calculate `exec-path'. Prepends `python-shell-exec-path' and adds the binary directory for virtualenv if `python-shell-virtualenv-root' is set - this will use the python interpreter from inside the virtualenv when starting the shell. If `default-directory' points to a remote host, the returned value appends `python-shell-remote-exec-path' instead of `exec-path'. (defalias 'python-shell-calculate-exec-path #[0 "\306\307!\203 \202\f\n! \310=\203\311\202\312\313\f!\211\203A\211@\314\315\316$\210\317\315\316$\2035\2028\211B\262A\266\202\202\210 \204H\207\313\320 \"C!\211\203u\211@\314\315\316$\210\317\315\316$\203i\202l\211B\262A\266\202\202O\210\207" [default-directory python-shell-remote-exec-path exec-path system-type python-shell-exec-path python-shell-virtualenv-root copy-sequence file-remote-p windows-nt "Scripts" "bin" reverse cl-delete :test string= cl-member expand-file-name] 9 (#$ . 58118)]) #@65 Update VEC's remote-path giving PATHS priority. (fn VEC PATHS) (defalias 'python-shell-tramp-refresh-remote-path #[514 "\300\301\302#\211\205<\303!\211\2032\211@\304\305\306$\210\307\305\306$\203&\202)\211B\262A\266\202\202\f\210\310\301#\210\311!\207" [tramp-get-connection-property "remote-path" nil reverse cl-delete :test string= cl-member tramp-set-connection-property tramp-set-remote-path] 10 (#$ . 59073)]) #@58 Update VEC's process environment with ENV. (fn VEC ENV) (defalias 'python-shell-tramp-refresh-process-environment #[514 "\302\303\304!\205 \304!C\305!\"\306\300!\203\202\307 !\310\211\211\203^\311@\312\313#\262\211\314\315A\312#\241\210\211A;\203Q\211A\316\230\204Q\317\320@A#B\262\202W\211@B\262A\262\202!\203s\321\317\322\314\315\323#$\324#\210\205\205\321\317\325\314\315\326#\"\324#)\207" [tramp-end-of-heredoc tramp-end-of-output append fboundp tramp-get-remote-locale copy-sequence boundp md5 nil split-string "=" omit mapconcat identity "" format "%s %s" tramp-send-command "while read var val; do export $var=$val; done <<'%s'\n%s\n%s" "\n" t "unset %s" " "] 16 (#$ . 59513)]) #@295 Modify shell environment during execution of BODY. Temporarily sets `process-environment' and `exec-path' during execution of body. If `default-directory' points to a remote machine then modifies `tramp-remote-process-environment' and `python-shell-remote-exec-path' instead. (fn &rest BODY) (defalias 'python-shell-with-environment '(macro . #[128 "\300\301!\302\303\304B\305\306\307BBD\310\306\311BBD\312\306\313BBDF\314\315D\316\317BB\320\321BBF\322!FD\207" [make-symbol "vec" progn let* ((when (file-remote-p default-directory) (ignore-errors (tramp-dissect-file-name default-directory 'noexpand)))) process-environment if (process-environment (python-shell-calculate-process-environment)) exec-path (exec-path (python-shell-calculate-exec-path)) tramp-remote-process-environment ((python-shell-calculate-process-environment) tramp-remote-process-environment) when tramp-get-connection-process python-shell-tramp-refresh-remote-path ((python-shell-calculate-exec-path)) python-shell-tramp-refresh-process-environment (tramp-remote-process-environment) macroexp-progn] 11 (#$ . 60247)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put python-shell-with-environment lisp-indent-function 0 put edebug-form-spec (body)] 5) #@152 Calculated input prompt regexp for inferior python shell. Do not set this variable directly, instead use `python-shell-prompt-set-calculated-regexps'. (defvar python-shell--prompt-calculated-input-regexp nil (#$ . 61511)) #@140 Input block prompt for inferior python shell. Do not set this variable directly, instead use `python-shell-prompt-set-calculated-regexps'. (defvar python-shell--block-prompt nil (#$ . 61740)) #@153 Calculated output prompt regexp for inferior python shell. Do not set this variable directly, instead use `python-shell-prompt-set-calculated-regexps'. (defvar python-shell--prompt-calculated-output-regexp nil (#$ . 61939)) (byte-code "\300\301\302\303!\203\f\304\202\305\306!\210\307\310#\207" [defalias python--parse-json-array fboundp json-parse-string #[257 "\300\301\302#\207" [json-parse-string :array-type list] 5 "\n\n(fn STRING)"] require json #[257 "\301\302!)\207" [json-array-type list json-read-from-string] 3 "\n\n(fn STRING)"] "Parse the JSON array in STRING into a Lisp list."] 4) #@554 Detect prompts for the current `python-shell-interpreter'. When prompts can be retrieved successfully from the `python-shell-interpreter' run with `python-shell-interpreter-interactive-arg', returns a list of three elements, where the first two are input prompts and the last one is an output prompt. When no prompts can be detected and `python-shell-prompt-detect-failure-warning' is non-nil, shows a warning with instructions to avoid hangs and returns nil. When `python-shell-prompt-detect-enabled' is nil avoids any detection and just returns nil. (defalias 'python-shell-prompt-detect #[0 "\205\336\306 !\205\3071\310 \311\"0\202\210\312\211\203 \n\202\"\313 \211\203+ \202-\314 \211\2037\313 \2028\f\315!\203J\316\314 \"\210\317\f\"\210 .\320\321\322\"r\211q\210\323\324\"\216\3251|\326\327!/\330\331!)\323\332\"\216\333\334\312%)\2620\210\202}\210\335 *\262\3362\312\337\340\322#\211\203\307\211@\341\342\"\205\245\3431\243\344!0\202\245\210\312\211G\345U\203\277\346\347\"\203\277\211@\350\230\204\277\351\336\"\210\210A\266\202\202\213\210\3120\211\204\3310\203\331\352\353\354\355#\210\266\203+\262\207" [python-shell-prompt-detect-enabled default-directory process-environment exec-path tramp-remote-process-environment python-shell-interpreter file-remote-p (error) tramp-dissect-file-name noexpand nil python-shell-calculate-process-environment python-shell-calculate-exec-path tramp-get-connection-process python-shell-tramp-refresh-remote-path python-shell-tramp-refresh-process-environment generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] (error) getenv "PYTHONUNBUFFERED" python-shell--save-temp-file "import sys\nps = [getattr(sys, 'ps%s' % i, '') for i in range(1,4)]\nps_json = '\\n[\"%s\", \"%s\", \"%s\"]\\n' % tuple(ps)\nprint (ps_json)\nsys.exit(0)\n" #[0 "\301\300!\207" [V0 delete-file] 2] process-file (t nil) buffer-string prompts split-string "\n" string-prefix-p "[\"" (error) python--parse-json-array 3 cl-every stringp "" throw lwarn (python python-shell-prompt-regexp) :warning "Python shell prompts cannot be detected.\nIf your emacs session hangs when starting python shells\nrecover with `keyboard-quit' and then try fixing the\ninteractive flag for your interpreter by adjusting the\n`python-shell-interpreter-interactive-arg' or add regexps\nmatching shell prompts in the directory-local friendly vars:\n + `python-shell-prompt-regexp'\n + `python-shell-prompt-block-regexp'\n + `python-shell-prompt-output-regexp'\nOr alternatively in:\n + `python-shell-prompt-input-regexps'\n + `python-shell-prompt-output-regexps'" python-shell-interpreter-interactive-arg inhibit-eol-conversion python-shell-prompt-detect-failure-warning] 11 (#$ . 62549)]) #@328 Validate all user provided regexps for prompts. Signals `user-error' if any of these vars contain invalid regexps: `python-shell-prompt-regexp', `python-shell-prompt-block-regexp', `python-shell-prompt-pdb-regexp', `python-shell-prompt-output-regexp', `python-shell-prompt-input-regexps', `python-shell-prompt-output-regexps'. (defalias 'python-shell-prompt-validate-regexps #[0 "\300\301\302\303\304\305\257\211\205>\211@\211J\211<\203\211\202\211C\262\211\2036\211@\306!\204/\307\310#\210A\266\202\202\210A\266\202\202\207" [python-shell-prompt-input-regexps python-shell-prompt-output-regexps python-shell-prompt-regexp python-shell-prompt-block-regexp python-shell-prompt-pdb-regexp python-shell-prompt-output-regexp python-util-valid-regexp-p user-error "Invalid regexp %s in `%s'"] 8 (#$ . 65360)]) #@466 Detect and set input and output prompt regexps. Build and set the values for `python-shell--prompt-calculated-input-regexp' and `python-shell--prompt-calculated-output-regexp' using the values from `python-shell-prompt-regexp', `python-shell-prompt-block-regexp', `python-shell-prompt-pdb-regexp', `python-shell-prompt-output-regexp', `python-shell-prompt-input-regexps', `python-shell-prompt-output-regexps' and detected prompts from `python-shell-prompt-detect'. (defalias 'python-shell-prompt-set-calculated-regexps #[0 "\205 ?\205\265\306 \307\211\310\311 \210\312\n \f E\"\211\2038\211@\313\314\315$\203,\202/\211B\262A\266\202\202\210B\211\203]\211@\313\314\315$\203Q\202T\211B\262A\266\202\202>\210\203\252\316!\211\203\212\211@\317!\262\313\314\315$\203~\202\201\211B\262A\266\202\202e\210A@\317\320!@!\313\314\315$\203\243\202\246\211B\262\262\211!\211!\211\266\204\207" [python-shell--prompt-calculated-input-regexp python-shell--prompt-calculated-output-regexp python-shell-prompt-input-regexps python-shell-prompt-regexp python-shell-prompt-block-regexp python-shell-prompt-pdb-regexp python-shell-prompt-detect nil #[257 "\300\301\302\303\304\"\305#\306Q\207" ["^\\(" mapconcat identity sort #[514 "GGU\203\231\207GGV\207" [] 6 "\n\n(fn A B)"] "\\|" "\\)"] 7 "\n\n(fn PROMPTS)"] python-shell-prompt-validate-regexps append cl-member :test string= butlast regexp-quote last python-shell-prompt-output-regexp python-shell-prompt-output-regexps python-shell--block-prompt] 11 (#$ . 66190)]) #@230 Calculate the appropriate process name for inferior Python process. If DEDICATED is t returns a string with the form `python-shell-buffer-name'[`buffer-name'] else returns the value of `python-shell-buffer-name'. (fn DEDICATED) (defalias 'python-shell-get-process-name #[257 "\211\203 \301\302\303 #\207\207" [python-shell-buffer-name format "%s[%s]" buffer-name] 5 (#$ . 67771)]) #@147 Calculate the appropriate process name for Internal Python process. The name is calculated from `python-shell-buffer-name' and the `buffer-name'. (defalias 'python-shell-internal-get-process-name #[0 "\301\302\303 #\207" [python-shell-internal-buffer-name format "%s[%s]" buffer-name] 4 (#$ . 68163)]) #@67 Calculate the string used to execute the inferior Python process. (defalias 'python-shell-calculate-command #[0 "\302\303\304C! #\207" [python-shell-interpreter python-shell-interpreter-args format "%s %s" combine-and-quote-strings] 4 (#$ . 68472)]) (byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias python-shell-parse-command python-shell-calculate-command nil make-obsolete "25.1"] 4) (defvar python-shell--package-depth 10) #@81 Add DIRECTORY parent to $PYTHONPATH and enable PACKAGE. (fn DIRECTORY PACKAGE) (defalias 'python-shell-package-enable #[514 "\300\301\302\211$\303 \"\207" [python-shell-send-string format "import os.path;import sys;sys.path.append(os.path.dirname(os.path.dirname('''%s''')));__package__ = '''%s''';import %s" python-shell-get-process] 8 (#$ . 68922) (byte-code "\302\303\304\305\306 \206\n!\"!\307\310\311 \"\"D\207" [default-directory python-shell--package-depth expand-file-name read-directory-name "Package root: " file-name-directory buffer-file-name completing-read "Package: " python-util-list-packages] 6)]) #@648 Accept PROCESS output with TIMEOUT until REGEXP is found. Optional argument TIMEOUT is the timeout argument to `accept-process-output' calls. Optional argument REGEXP overrides the regexp to match the end of output, defaults to `comint-prompt-regexp'. Returns non-nil when output was properly captured. This utility is useful in situations where the output may be received in chunks, since `accept-process-output' gives no guarantees they will be grabbed in a single call. An example use case for this would be the CPython shell start-up, where the banner and the initial prompt are received separately. (fn PROCESS &optional TIMEOUT REGEXP) (defalias 'python-shell-accept-process-output #[769 "\211\206\3012&\302\"\204\303\301\304\"\210\305\306 @\"\203 \303\301\307\"\210\202 \207" [comint-prompt-regexp found accept-process-output throw nil looking-back python-util-comint-last-prompt t] 7 (#$ . 69552)]) #@63 Return non-nil if OUTPUT ends with input prompt. (fn OUTPUT) (defalias 'python-shell-comint-end-of-output-p #[257 "\301\302\303\304\305#\306Q\"\207" [python-shell--prompt-calculated-input-regexp string-match " ?\n?" replace-regexp-in-string "\\`\\^" "" "\\'"] 7 (#$ . 70481)]) (byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias python-comint-output-filter-function ansi-color-filter-apply nil make-obsolete "25.1"] 4) #@127 Faster version of `comint-postoutput-scroll-to-bottom'. Avoids `recenter' calls until OUTPUT is completely sent. (fn OUTPUT) (defalias 'python-comint-postoutput-scroll-to-bottom #[257 "\211\300\230\204\301\302!!\203\303!\210\207" ["" python-shell-comint-end-of-output-p ansi-color-filter-apply comint-postoutput-scroll-to-bottom] 4 (#$ . 70924)]) (defvar python-shell--parent-buffer nil) #@156 Execute the forms in BODY with the shell buffer temporarily current. Signals an error if no shell buffer is available for current buffer. (fn &rest BODY) (defalias 'python-shell-with-shell-buffer '(macro . #[128 "\300\301!\302\303BC\304\305DBBE\207" [make-symbol "shell-process" let ((python-shell-get-process-or-error)) with-current-buffer process-buffer] 7 (#$ . 71326)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put python-shell-with-shell-buffer lisp-indent-function 0 put edebug-form-spec t] 5) (defvar python-shell--font-lock-buffer nil) #@64 Get or create a font-lock buffer for current inferior process. (defalias 'python-shell-font-lock-get-or-create-buffer #[0 "\301 r\302!q\210\203\202\303\304p!!\305\306\307\"!\262)\207" [python-shell--font-lock-buffer python-shell-get-process-or-error process-buffer process-name get-buffer-process generate-new-buffer format " *%s-font-lock*"] 6 (#$ . 71902)]) #@35 Kill the font-lock buffer safely. (defalias 'python-shell-font-lock-kill-buffer #[0 "\205\301!\205\302!\210\303\304!\205\305\211\207" [python-shell--font-lock-buffer buffer-live-p kill-buffer derived-mode-p inferior-python-mode nil] 2 (#$ . 72277)]) #@160 Execute the forms in BODY in the font-lock buffer. The value returned is the value of the last form in BODY. See also `with-current-buffer'. (fn &rest BODY) (defalias 'python-shell-font-lock-with-font-lock-buffer '(macro . #[128 "\300\301\302\303\304\305\306\307\310 BBB\257D\207" [python-shell-with-shell-buffer save-current-buffer (when (not (and python-shell--font-lock-buffer (get-buffer python-shell--font-lock-buffer))) (setq python-shell--font-lock-buffer (python-shell-font-lock-get-or-create-buffer))) (set-buffer python-shell--font-lock-buffer) (when (not font-lock-mode) (font-lock-mode 1)) (set (make-local-variable 'delay-mode-hooks) t) let ((python-indent-guess-indent-offset nil)) (when (not (derived-mode-p 'python-mode)) (python-mode))] 11 (#$ . 72544)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put python-shell-font-lock-with-font-lock-buffer lisp-indent-function 0 put edebug-form-spec t] 5) #@158 Cleanup the font-lock buffer. Provided as a command because this might be handy if something goes wrong and syntax highlighting in the shell gets messed up. (defalias 'python-shell-font-lock-cleanup-buffer #[0 "\304 r\305!q\210\304 r\305!q\210r\203\306!\204\307 q\210 \204)\301\310!\210\311\302!\210\312\313\314\315!\204:\315 \210\316 +\262)\207" [python-shell--font-lock-buffer font-lock-mode delay-mode-hooks python-indent-guess-indent-offset python-shell-get-process-or-error process-buffer get-buffer python-shell-font-lock-get-or-create-buffer 1 make-local-variable t nil derived-mode-p python-mode erase-buffer] 4 (#$ . 73489) nil]) #@62 Clean up the font-lock buffer after any OUTPUT. (fn OUTPUT) (defalias 'python-shell-font-lock-comint-output-filter-function #[257 "\211\304\230?\205[\305!\306!\205\307\310\"?\262\203 \311 \210\202Z\312 r\313!q\210r\2033\314!\2046\315 q\210 \204A\301\316!\210\317\302!\210\320\321\322\323!\204R\323 \210db\210\324 \210+\210\211\207" [python-shell--font-lock-buffer font-lock-mode delay-mode-hooks python-indent-guess-indent-offset "" ansi-color-filter-apply python-shell-comint-end-of-output-p string-match "\\.\\.\\." python-shell-font-lock-cleanup-buffer python-shell-get-process-or-error process-buffer get-buffer python-shell-font-lock-get-or-create-buffer 1 make-local-variable t nil derived-mode-p python-mode newline] 5 (#$ . 74149)]) #@41 Fontifies current line in shell buffer. (defalias 'python-shell-font-lock-post-command-hook #[0 "\306 A\211\205\265`V\205\265\307\310p!!\205\265\311d\"\312\313\312\314 r\315!q\210r\n\2032\316\n!\2045\317 \nq\210 \204@\303\320!\210\321\304!\210\313\312\322\323!\204Q\323 \210\324 d|\210`\262c\210\325\326!\203h\326 \210\202k\327 \210d{+\262\211G\330\211U?\205\262\331\"\332\"\206\207\333\334\"\211\204\223\202\236\335\334\312#\210\335\336#\262\337\\ \\#\210\266\204\202t*\266\206\207" [deactivate-mark buffer-undo-list python-shell--font-lock-buffer font-lock-mode delay-mode-hooks python-indent-guess-indent-offset python-util-comint-last-prompt process-live-p get-buffer-process buffer-substring-no-properties nil t python-shell-get-process-or-error process-buffer get-buffer python-shell-font-lock-get-or-create-buffer 1 make-local-variable derived-mode-p python-mode line-beginning-position fboundp font-lock-ensure font-lock-default-fontify-buffer 0 text-properties-at next-property-change plist-get face plist-put font-lock-face set-text-properties] 14 (#$ . 74917)]) #@89 Turn on shell font-lock. With argument MSG show activation message. (fn &optional MSG) (defalias 'python-shell-font-lock-turn-on #[256 "\301 r\302!q\210\303 \210\304\300!\210\305\306\307\310\305\311$\210\306\312\303\305\311$\210\306\313\314\315\311$\210\205-\316\317!)\207" [python-shell--font-lock-buffer python-shell-get-process-or-error process-buffer python-shell-font-lock-kill-buffer make-local-variable nil add-hook post-command-hook python-shell-font-lock-post-command-hook local kill-buffer-hook comint-output-filter-functions python-shell-font-lock-comint-output-filter-function append message "Shell font-lock is enabled"] 7 (#$ . 76042) "p"]) #@92 Turn off shell font-lock. With argument MSG show deactivation message. (fn &optional MSG) (defalias 'python-shell-font-lock-turn-off #[256 "\301 r\302!q\210\303 \210\304 \203\305\304 A\306 \307#\210\310\300!\210\311\312\313\314\315#\210\312\316\303\315#\210\312\317\320\315#\210\2058\321\322!)\207" [python-shell--font-lock-buffer python-shell-get-process-or-error process-buffer python-shell-font-lock-kill-buffer python-util-comint-last-prompt remove-text-properties line-end-position (face nil font-lock-face nil) make-local-variable nil remove-hook post-command-hook python-shell-font-lock-post-command-hook local kill-buffer-hook comint-output-filter-functions python-shell-font-lock-comint-output-filter-function message "Shell font-lock is disabled"] 6 (#$ . 76708) "p"]) #@105 Toggle font-lock for shell. With argument MSG show activation/deactivation message. (fn &optional MSG) (defalias 'python-shell-font-lock-toggle #[256 "\301 r\302!q\210\303\300!\210?\211\203\304!\210\202\305!\210)\207" [python-shell-font-lock-enable python-shell-get-process-or-error process-buffer make-local-variable python-shell-font-lock-turn-on python-shell-font-lock-turn-off] 5 (#$ . 77501) "p"]) (defvar python-shell--first-prompt-received-output-buffer nil) (defvar python-shell--first-prompt-received nil) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable python-shell-first-prompt-hook funcall function #[0 "\300\207" [nil] 1] "Hook run upon first (non-pdb) shell prompt detection.\nThis is the place for shell setup functions that need to wait for\noutput. Since the first prompt is ensured, this helps the\ncurrent process to not hang while waiting. This is useful to\nsafely attach setup code for long-running processes that\neventually provide a shell." :version "25.1" :type hook :group python] 10) #@89 Run `python-shell-first-prompt-hook' when first prompt is found in OUTPUT. (fn OUTPUT) (defalias 'python-shell-comint-watch-for-first-prompt-output-filter #[257 "\204@\305\301!\210 \306!P\307 !\203@\n\310P \206\311\312\313\314#)\266\203\203-\312\207\305\300!\210\313\312rpq\210\312\315\316!\210*\207" [python-shell--first-prompt-received python-shell--first-prompt-received-output-buffer python-shell-prompt-pdb-regexp inhibit-changing-match-data inhibit-quit make-local-variable ansi-color-filter-apply python-shell-comint-end-of-output-p "\\'" "" nil t string-match run-hooks python-shell-first-prompt-hook] 8 (#$ . 78579)]) (defvar inferior-python-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [inferior-python-mode-hook variable-documentation put "Hook run after entering Inferior Python mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp inferior-python-mode-map definition-name inferior-python-mode] 4) (defvar inferior-python-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [inferior-python-mode-abbrev-table inferior-python-mode-map variable-documentation put purecopy "Keymap for `inferior-python-mode'." boundp inferior-python-mode-syntax-table definition-name inferior-python-mode (lambda (#1=#:def-tmp-var) (defvar inferior-python-mode-syntax-table #1#)) make-syntax-table "Syntax table for `inferior-python-mode'." (lambda (#1#) (defvar inferior-python-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `inferior-python-mode'." derived-mode-parent comint-mode] 5) #@989 Major mode for Python inferior process. Runs a Python interpreter as a subprocess of Emacs, with Python I/O through an Emacs buffer. Variables `python-shell-interpreter' and `python-shell-interpreter-args' control which Python interpreter is run. Variables `python-shell-prompt-regexp', `python-shell-prompt-output-regexp', `python-shell-prompt-block-regexp', `python-shell-font-lock-enable', `python-shell-completion-setup-code', `python-shell-completion-string-code', `python-eldoc-setup-code', `python-eldoc-string-code', `python-ffap-setup-code' and `python-ffap-string-code' can customize this mode for different Python interpreters. This mode resets `comint-output-filter-functions' locally, so you may want to re-add custom functions to it using the `inferior-python-mode-hook'. You can also add additional setup code to be run at initialization of the interpreter via `python-shell-setup-codes' variable. (Type \[describe-mode] in the process buffer for a list of commands.) (defalias 'inferior-python-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2035\211\321 =\203;\322\f\323 \"\210\210\324 \325\"\204R 6=\204R\326 \3256C#\210\327 !\210\330\f!\210 67\203g\3317!\210\306\332!\210\333\306\334!\2108\206y\306\335!\2109\206\206\306\336!\210\333\306\337!\210\333\306\340!\210\333 \341 \210:\306\342!\210\307\"\343;\306\344!\210\345$\306\346!\210\333&\306\347!\210<'\350\351\352\333\353$\210\354 \355\356#\210\306\357!\210=\203\335\360 \210\361\362!\210\363 \210)\364\365!\207" [delay-mode-hooks major-mode mode-name inferior-python-mode-map inferior-python-mode-syntax-table inferior-python-mode-abbrev-table make-local-variable t comint-mode inferior-python-mode "Inferior Python" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table python-util-clone-local-variables indent-tabs-mode nil python-shell-interpreter python-shell-interpreter-args python-shell--prompt-calculated-input-regexp python-shell--block-prompt python-shell--prompt-calculated-output-regexp python-shell-prompt-set-calculated-regexps comint-prompt-read-only (":%s") comint-output-filter-functions (ansi-color-process-output python-shell-comint-watch-for-first-prompt-output-filter python-comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) comint-highlight-input compilation-error-regexp-alist add-hook completion-at-point-functions python-shell-completion-at-point local define-key " " python-shell-completion-complete-or-indent python-shell-internal-last-output python-shell-font-lock-turn-on compilation-shell-minor-mode 1 python-pdbtrack-setup-tracking run-mode-hooks inferior-python-mode-hook local-abbrev-table python-shell--parent-buffer python-shell--interpreter python-shell--interpreter-args comint-prompt-regexp mode-line-process python-shell-compilation-regexp-alist python-shell-font-lock-enable] 5 (#$ . 80505) nil]) #@589 Create a Python shell comint buffer. CMD is the Python command to be executed and PROC-NAME is the process name the comint buffer will get. After the comint buffer is created the `inferior-python-mode' is activated. When optional argument SHOW is non-nil the buffer is shown. When optional argument INTERNAL is non-nil this process is run on a buffer with a name that starts with a space, following the Emacs convention for temporary/internal buffers, and also makes sure the user is not queried for confirmation when the process is killed. (fn CMD PROC-NAME &optional SHOW INTERNAL) (defalias 'python-shell-make-comint #[1026 "\212\306!\205\3071\310\311\"0\202\210\312\211\203 \202\313 \211\203(\n\202*\314 \211\2034\313 \2025 \315!\203G\316\314 \"\210\317 \"\210\320\204P\321\202Q\322\"\323!\204\231\324!\211@A\325\326 \312&p\327!\330\331\332#rq\210\333 \210)\203\214\334!\210\203\226\335\312\"\210+\266\211\262+\262)\207" [default-directory process-environment exec-path tramp-remote-process-environment python-shell--parent-buffer python-shell--interpreter file-remote-p (error) tramp-dissect-file-name noexpand nil python-shell-calculate-process-environment python-shell-calculate-exec-path tramp-get-connection-process python-shell-tramp-refresh-remote-path python-shell-tramp-refresh-process-environment format "*%s*" " *%s*" comint-check-proc split-string-and-unquote apply make-comint-in-buffer get-buffer-process mapconcat identity " " inferior-python-mode display-buffer set-process-query-on-exit-flag python-shell--interpreter-args] 16 (#$ . 83625)]) #@746 Run an inferior Python process. Argument CMD defaults to `python-shell-calculate-command' return value. When called interactively with `prefix-arg', it allows the user to edit such value and choose whether the interpreter should be DEDICATED for the current buffer. When numeric prefix arg is other than 0 or 4 do not SHOW. For a given buffer and same values of DEDICATED, if a process is already running for it, it will do nothing. This means that if the current buffer is using a global process, the user is still able to switch it to use a dedicated one. Runs the hook `inferior-python-mode-hook' after `comint-mode-hook' is run. (Type \[describe-mode] in the process buffer for a list of commands.) (fn &optional CMD DEDICATED SHOW) (defalias 'run-python #[768 "\300\206\301 \302!#\211q\210\303!\207" [python-shell-make-comint python-shell-calculate-command python-shell-get-process-name get-buffer-process] 7 (#$ . 85257) (byte-code "\203\301\302\303 \"\304\305!\306!\307UE\207\303 \310\311E\207" [current-prefix-arg read-shell-command "Run Python: " python-shell-calculate-command y-or-n-p "Make dedicated process? " prefix-numeric-value 4 nil t] 4)]) #@668 Run an inferior Internal Python process. Input and output via buffer named after `python-shell-internal-buffer-name' and what `python-shell-internal-get-process-name' returns. This new kind of shell is intended to be used for generic communication related to defined configurations; the main difference with global or dedicated shells is that these ones are attached to a configuration, not a buffer. This means that can be used for example to retrieve the sys.path and other stuff, without messing with user shells. Note that `python-shell-font-lock-enable' and `inferior-python-mode-hook' are set to nil for these shells, so setup codes are not sent at startup. (defalias 'run-python-internal #[0 "\302\211\303\304\305 \306 \302\307$!*\207" [inferior-python-mode-hook python-shell-font-lock-enable nil get-buffer-process python-shell-make-comint python-shell-calculate-command python-shell-internal-get-process-name t] 6 (#$ . 86440)]) #@110 Return inferior Python buffer for current buffer. If current buffer is in `inferior-python-mode', return it. (defalias 'python-shell-get-buffer #[0 "\300\301!\203p\207\302\303!\304\305\"\302\306!\304\305\"\307!\307!\203$\206)\211\205)\207" [derived-mode-p inferior-python-mode python-shell-get-process-name t format "*%s*" nil comint-check-proc] 7 (#$ . 87390)]) #@52 Return inferior Python process for current buffer. (defalias 'python-shell-get-process #[0 "\300\301 !\207" [get-buffer-process python-shell-get-buffer] 2 (#$ . 87771)]) #@202 Return inferior Python process for current buffer or signal error. When argument INTERACTIVEP is non-nil, use `user-error' instead of `error' with a user-friendly message. (fn &optional INTERACTIVEP) (defalias 'python-shell-get-process-or-error #[256 "\301 \206\211\203\302\303\304\305\306\307#!\"\207\310\311!\207" [overriding-local-map python-shell-get-process user-error "Start a Python process first with `M-x run-python' or `%s'." key-description where-is-internal run-python t error "No inferior Python process running."] 8 (#$ . 87948)]) #@324 Get or create an inferior Python process for current buffer and return it. Arguments CMD, DEDICATED and SHOW are those of `run-python' and are used to start the shell. If those arguments are not provided, `run-python' is called interactively and the user will be asked for their values. (fn &optional CMD DEDICATED SHOW) (defalias 'python-shell-get-or-create-process #[768 "\300 \211\204\204\301\302!\210\202\302#\210\211\206\300 \207" [python-shell-get-process call-interactively run-python] 8 (#$ . 88506)]) (byte-code "\300\301\302\303#\210\304\305\306\307#\210\310\211\203.\211@\305N\203'\306N\204'\311\306\305N#\210A\266\202\202 \210\312\305\306\313#\207" [make-obsolete python-shell-get-or-create-process "Instead call `python-shell-get-process' and create one if returns nil." "25.1" defvaralias python-buffer python-shell-internal-buffer nil (saved-value saved-variable-comment) put make-obsolete-variable "24.3"] 7) #@157 Current internal shell buffer for the current buffer. This is really not necessary at all for the code to work but it's there for compatibility with CEDET. (defvar python-shell-internal-buffer nil (#$ . 89461)) (byte-code "\300\301\302\303#\210\304\211\203(\211@\301N\203!\302N\204!\305\302\301N#\210A\266\202\202\210\306\301\302\307#\207" [defvaralias python-preoutput-result python-shell-internal-last-output nil (saved-value saved-variable-comment) put make-obsolete-variable "24.3"] 7) #@147 Last output captured by the internal shell. This is really not necessary at all for the code to work but it's there for compatibility with CEDET. (defvar python-shell-internal-last-output nil (#$ . 89968)) #@52 Get or create an inferior Internal Python process. (defalias 'python-shell-internal-get-or-create-process #[0 "\300 \301!\203\f\302!\207\303 \207" [python-shell-internal-get-process-name process-live-p get-process run-python-internal] 3 (#$ . 90180)]) (byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias python-proc python-shell-internal-get-or-create-process nil make-obsolete "24.3"] 4) #@15 (fn STRING) (defalias 'python-shell--save-temp-file #[257 "\303!\203\303!\304P\202 \305\306!\307 \211\310\311\312\"\313\314\"\216r\211q\210c\210\315 \210)r\211q\210\316\317\211\317\320%\210*\266*\207" [default-directory temporary-file-directory coding-system-for-write file-remote-p "/tmp" make-temp-file "py" python-info-encoding generate-new-buffer " *temp file*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] delete-trailing-whitespace write-region nil 0] 10 (#$ . 90592)]) #@229 Send STRING to inferior Python PROCESS. When optional argument MSG is non-nil, forces display of a user-friendly message if there's no process running; defaults to t when called interactively. (fn STRING &optional PROCESS MSG) (defalias 'python-shell-send-string #[769 "\206\300!\301\302\"\203\303!\304 \206\211\305\306$\207\307\"\210\301\310\"\2031\301\311\"\2055\307\312\"\207" [python-shell-get-process-or-error string-match ".\n+." python-shell--save-temp-file buffer-file-name python-shell-send-file t comint-send-string "\n\\'" "\n[ ].*\n?\\'" "\n"] 11 (#$ . 91126) (byte-code "\300\301!\302\303E\207" [read-string "Python command: " nil t] 3)]) (defvar python-shell-output-filter-in-progress nil) (defvar python-shell-output-filter-buffer nil) #@308 Filter used in `python-shell-send-string-no-output' to grab output. STRING is the output received to this point from the process. This filter saves received output from the process in `python-shell-output-filter-buffer' and stops receiving it after detecting a prompt at the end of the buffer. (fn STRING) (defalias 'python-shell-output-filter #[257 "\303!\262P\304!\203$\305\306\211\224O\307\n\"\203$\306\225\305O\310\207" [python-shell-output-filter-buffer python-shell-output-filter-in-progress python-shell--prompt-calculated-output-regexp ansi-color-filter-apply python-shell-comint-end-of-output-p nil 0 string-match ""] 4 (#$ . 91906)]) #@94 Send STRING to PROCESS and inhibit output. Return the output. (fn STRING &optional PROCESS) (defalias 'python-shell-send-string-no-output #[513 "\211\206\305 \306\307\211\3101*\311\312\"\210 \203\"\313!\210\202 \311)0\2020\210\307\314\315!\206<r\316!q\210\317 )+\207" [inhibit-quit python-shell-output-filter-in-progress comint-preoutput-filter-functions python-shell-output-filter-buffer quit-flag python-shell-get-process-or-error (python-shell-output-filter) t (quit) nil python-shell-send-string accept-process-output eval (ignore nil) process-buffer comint-interrupt-subjob] 6 (#$ . 92571)]) #@125 Send STRING to the Internal Python interpreter. Returns the output. See `python-shell-send-string-no-output'. (fn STRING) (defalias 'python-shell-internal-send-string #[257 "\301\302\303\304#\305 \"\211\207" [python-shell-internal-last-output python-shell-send-string-no-output replace-regexp-in-string "_emacs_out +" "" python-shell-internal-get-or-create-process] 6 (#$ . 93194)]) (byte-code "\300\301\302\303#\210\304\301\302\305#\210\300\306\302\303#\210\304\306\302\305#\207" [defalias python-send-receive python-shell-internal-send-string nil make-obsolete "24.3" python-send-string] 4) #@694 Send buffer substring from START to END formatted for shell. This is a wrapper over `buffer-substring' that takes care of different transformations for the code sent to be evaluated in the python shell: 1. When optional argument NOMAIN is non-nil everything under an "if __name__ == \='__main__\='" block will be removed. 2. When a subregion of the buffer is sent, it takes care of appending extra empty lines so tracebacks are correct. 3. When the region sent is a substring of the current buffer, a coding cookie is added. 4. Wraps indented regions under an "if True:" block so the interpreter evaluates them correctly. (fn START END &optional NOMAIN NO-COOKIE) (defalias 'python-shell-buffer-substring #[1026 "\212b\210\301 {\302\303\304\305#)\266\204\203\301 \202)\306\"\214~\210eU)\307 \212b\210\310\311!\210\312 )\313U?\205Q?\205Q\314\315\"\316\317!\320Z\321\"P\322\323\304\"r\211q\210\324\325\"\216\326 \210\203hc\210c\210eb\210\204z\327c\210`\330 |\210\203\262\205\224\212\331 \205\223`\332 \210\311y\210`B)\211@A\316\317!\317!Z\321\"\203\260b\210|\210\211c\210\266eb\210\333\304\334!)\262\203\326\311y\210\333\304\334!)\262\203\326\301 \330 |\210\306ed\"*\207" [inhibit-changing-match-data line-beginning-position "\\`[ \n ]*\\'" nil t string-match buffer-substring-no-properties python-info-encoding python-util-forward-comment 1 current-indentation 0 format "# -*- coding: %s -*-\n" make-string line-number-at-pos 2 10 generate-new-buffer " *temp*" make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] python-mode "if True:" line-end-position python-nav-if-name-main python-nav-forward-sexp-safe "^#[[:space:]]*\\(?:coding[:=][[:space:]]*\\(?1:\\(?:[[:word:]]\\|-\\)+\\)\\|-\\*-[[:space:]]*coding:[[:space:]]*\\(?1:\\(?:[[:word:]]\\|-\\)+\\)[[:space:]]*-\\*-\\|vim:[[:space:]]*set[[:space:]]+fileencoding[[:space:]]*=[[:space:]]*\\(?1:\\(?:[[:word:]]\\|-\\)+\\)[[:space:]]*:\\)" looking-at] 18 (#$ . 93798)]) #@499 Send the region delimited by START and END to inferior Python process. When optional argument SEND-MAIN is non-nil, allow execution of code inside blocks delimited by "if __name__== \='__main__\=':". When called interactively SEND-MAIN defaults to nil, unless it's called with prefix argument. When optional argument MSG is non-nil, forces display of a user-friendly message if there's no process running; defaults to t when called interactively. (fn START END &optional SEND-MAIN MSG NO-COOKIE) (defalias 'python-shell-send-region #[1282 "\300?$\301!\302\"\303\304\305\"\210\306\307\310\311\"\"\210r\312!q\210\313 \210)\314\"\207" [python-shell-buffer-substring python-shell-get-process-or-error buffer-substring-no-properties nil string-match "\\`\n*\\(.*\\)" message "Sent: %s..." match-string 1 process-buffer compilation-forget-errors python-shell-send-string] 14 (#$ . 95836) (byte-code "\301 \302 \303F\207" [current-prefix-arg region-beginning region-end t] 4)]) #@622 Send the statement at point to inferior Python process. The statement is delimited by `python-nav-beginning-of-statement' and `python-nav-end-of-statement', but if the region is active, the text in the region is sent instead via `python-shell-send-region'. Optional argument SEND-MAIN, if non-nil, means allow execution of code inside blocks delimited by "if __name__ == \='__main__\=':". Interactively, SEND-MAIN is the prefix argument. Optional argument MSG, if non-nil, forces display of a user-friendly message if there's no process running; it defaults to t when called interactively. (fn &optional SEND-MAIN MSG) (defalias 'python-shell-send-statement #[512 "\300 \203\301\302 \303 $\207\301\212\304 )\212\305 )\306%\207" [region-active-p python-shell-send-region region-beginning region-end python-nav-beginning-of-statement python-nav-end-of-statement t] 8 (#$ . 96831) (list current-prefix-arg t)]) #@459 Send the entire buffer to inferior Python process. When optional argument SEND-MAIN is non-nil, allow execution of code inside blocks delimited by "if __name__== \='__main__\=':". When called interactively SEND-MAIN defaults to nil, unless it's called with prefix argument. When optional argument MSG is non-nil, forces display of a user-friendly message if there's no process running; defaults to t when called interactively. (fn &optional SEND-MAIN MSG) (defalias 'python-shell-send-buffer #[512 "\214~\210\300ed$)\207" [python-shell-send-region] 7 (#$ . 97754) (list current-prefix-arg t)]) #@286 Send the current defun to inferior Python process. When argument ARG is non-nil do not include decorators. When optional argument MSG is non-nil, forces display of a user-friendly message if there's no process running; defaults to t when called interactively. (fn &optional ARG MSG) (defalias 'python-shell-send-defun #[512 "`\212\300\301\210\302 \204\303\301!\203\304 \305V\204\204,\306y\305=\203,\307\310!\204\301y\210\311 b\210\312 \2049\301\210\311 \313$)\207" [python-shell-send-region 1 python-nav-beginning-of-defun beginning-of-line current-indentation 0 -1 looking-at "^[[:space:]]*@[_[:alpha:]][_[:word:]]*" point-marker python-nav-end-of-defun nil] 8 (#$ . 98359) (list current-prefix-arg t)]) #@497 Send FILE-NAME to inferior Python PROCESS. If TEMP-FILE-NAME is passed then that file is used for processing instead, while internally the shell will continue to use FILE-NAME. If TEMP-FILE-NAME and DELETE are non-nil, then TEMP-FILE-NAME is deleted after evaluation is performed. When optional argument MSG is non-nil, forces display of a user-friendly message if there's no process running; defaults to t when called interactively. (fn FILE-NAME &optional PROCESS TEMP-FILE-NAME DELETE MSG) (defalias 'python-shell-send-file #[1281 "\206\300!\301\302\303\"r\211q\210\304\305\"\216\306\206!\210\307 *\262\310\311!!\2052\310\311!!\312\313\314\205B\205B\313\315\"\316Q\206I\211%\"\207" [python-shell-get-process-or-error generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents python-info-encoding file-local-name expand-file-name python-shell-send-string format "import codecs, os;__pyfile = codecs.open('''%s''', encoding='''%s''');__code = __pyfile.read().encode('''%s''');__pyfile.close();" "os.remove('''%s''');" "exec(compile(__code, '''%s''', 'exec'));"] 16 (#$ . 99089) (byte-code "\300\301!\302\211\211\303\257\207" [read-file-name "File to send: " nil t] 5)]) #@216 Switch to inferior Python process buffer. When optional argument MSG is non-nil, forces display of a user-friendly message if there's no process running; defaults to t when called interactively. (fn &optional MSG) (defalias 'python-shell-switch-to-shell #[256 "\300\301\302!!\303\304#\207" [pop-to-buffer process-buffer python-shell-get-process-or-error nil t] 5 (#$ . 100377) "p"]) #@125 Send all setup code for shell. This function takes the list of setup code to send from the `python-shell-setup-codes' list. (defalias 'python-shell-send-setup-code #[0 "\205\301 \302\303\304#\260\305\"\210\306!\266\202\207" [python-shell-setup-codes python-shell-get-process mapconcat #[257 "\211;\203\207\2119\203\211J\207\300\207" [""] 2 "\n\n(fn ELT)"] "\n\nprint ('python.el: sent setup code')" python-shell-send-string python-shell-accept-process-output] 5 (#$ . 100769)]) (byte-code "\300\301\302\"\210\303\304\305\306\307DD\310\311\312\313\314&\210\315\316\317\320#\210\321\211\203<\211@\316N\2035\317N\2045\322\317\316N#\210A\266\202\202\210\323\316\317\324#\210\315\325\317\326#\210\321\211\203k\211@\325N\203d\317N\204d\322\317\325N#\210A\266\202\202J\210\323\325\317\327#\210\303\317\305\306\330DD\331\311\312\313\314&\210\303\332\305\306\333DD\334\335\327\311\336&\210\303\337\305\306\340DD\341\335\327\311\342&\210\303\343\305\306\344DD\345\335\327\311\346&\210\303\347\305\306\350DD\351\335\327\311\346&\207" [add-hook python-shell-first-prompt-hook python-shell-send-setup-code custom-declare-variable python-shell-completion-setup-code funcall function #[0 "\300\207" [#1="\ndef __PYTHON_EL_get_completions(text):\n completions = []\n completer = None\n\n try:\n import readline\n\n try:\n import __builtin__\n except ImportError:\n # Python 3\n import builtins as __builtin__\n builtins = dir(__builtin__)\n\n is_ipython = ('__IPYTHON__' in builtins or\n '__IPYTHON__active' in builtins)\n splits = text.split()\n is_module = splits and splits[0] in ('from', 'import')\n\n if is_ipython and is_module:\n from IPython.core.completerlib import module_completion\n completions = module_completion(text.strip())\n elif is_ipython and '__IP' in builtins:\n completions = __IP.complete(text)\n elif is_ipython and 'get_ipython' in builtins:\n completions = get_ipython().Completer.all_completions(text)\n else:\n # Try to reuse current completer.\n completer = readline.get_completer()\n if not completer:\n # importing rlcompleter sets the completer, use it as a\n # last resort to avoid breaking customizations.\n import rlcompleter\n completer = readline.get_completer()\n if getattr(completer, 'PYTHON_EL_WRAPPED', False):\n completer.print_mode = False\n i = 0\n while True:\n completion = completer(text, i)\n if not completion:\n break\n i += 1\n completions.append(completion)\n except:\n pass\n finally:\n if getattr(completer, 'PYTHON_EL_WRAPPED', False):\n completer.print_mode = True\n return completions"] 1 #1#] "Code used to setup completion in inferior Python processes." :type string :group python defvaralias python-shell-completion-module-string-code python-shell-completion-string-code "Completion string code must also autocomplete modules." (saved-value saved-variable-comment) put make-obsolete-variable "24.4" python-shell-completion-pdb-string-code "Completion string code must work for (i)pdb." "25.1" #[0 "\300\207" [#2="';'.join(__PYTHON_EL_get_completions('''%s'''))"] 1 #2#] "Python code used to get a string of completions separated by semicolons.\nThe string passed to the function is the current python name or\nthe full statement in the case of imports." python-shell-completion-native-disabled-interpreters #[0 "\301=\203\302\207\303\207" [system-type windows-nt ("") ("pypy" "ipython")] 2] "List of disabled interpreters.\nWhen a match is found, native completion is disabled." :version (repeat string) python-shell-completion-native-enable #[0 "\300\207" [t] 1] "Enable readline based native completion." boolean python-shell-completion-native-output-timeout #[0 "\300\207" [5.0] 1] "Time in seconds to wait for completion output before giving up." float python-shell-completion-native-try-output-timeout #[0 "\300\207" [1.0] 1] "Time in seconds to wait for *trying* native completion output."] 8) #@60 Buffer to be used to redirect output of readline commands. (defvar python-shell-completion-native-redirect-buffer " *Python completions redirect*" (#$ . 105099)) #@63 Return non-nil if interpreter has native completion disabled. (defalias 'python-shell-completion-native-interpreter-disabled-p #[0 "\205\f\302\303!\304 !\"\207" [python-shell-completion-native-disabled-interpreters python-shell-interpreter string-match regexp-opt file-name-nondirectory] 4 (#$ . 105267)]) #@50 Return non-nil if can trigger native completion. (defalias 'python-shell-completion-native-try #[0 "\303\304\305p!\306\307#*\207" [python-shell-completion-native-try-output-timeout python-shell-completion-native-output-timeout python-shell-completion-native-enable t python-shell-completion-native-get-completions get-buffer-process nil "_"] 4 (#$ . 105582)]) #@60 Try to setup native completion, return non-nil on success. (defalias 'python-shell-completion-native-setup #[0 "\301 r\302!q\210\303\304\"\210\305\"\205!\212\306\307\310\311\312$)\205!\313 )\207" [python-shell-completion-native-try-output-timeout python-shell-get-process process-buffer python-shell-send-string "\ndef __PYTHON_EL_native_completion_setup():\n try:\n import readline\n\n try:\n import __builtin__\n except ImportError:\n # Python 3\n import builtins as __builtin__\n\n builtins = dir(__builtin__)\n is_ipython = ('__IPYTHON__' in builtins or\n '__IPYTHON__active' in builtins)\n\n class __PYTHON_EL_Completer:\n '''Completer wrapper that prints candidates to stdout.\n\n It wraps an existing completer function and changes its behavior so\n that the user input is unchanged and real candidates are printed to\n stdout.\n\n Returned candidates are '0__dummy_completion__' and\n '1__dummy_completion__' in that order ('0__dummy_completion__' is\n returned repeatedly until all possible candidates are consumed).\n\n The real candidates are printed to stdout so that they can be\n easily retrieved through comint output redirect trickery.\n '''\n\n PYTHON_EL_WRAPPED = True\n\n def __init__(self, completer):\n self.completer = completer\n self.last_completion = None\n self.print_mode = True\n\n def __call__(self, text, state):\n if state == 0:\n # Set the first dummy completion.\n self.last_completion = None\n completion = '0__dummy_completion__'\n else:\n completion = self.completer(text, state - 1)\n\n if not completion:\n if self.last_completion != '1__dummy_completion__':\n # When no more completions are available, returning a\n # dummy with non-sharing prefix allow ensuring output\n # while preventing changes to current input.\n # Coincidentally it's also the end of output.\n completion = '1__dummy_completion__'\n elif completion.endswith('('):\n # Remove parens on callables as it breaks completion on\n # arguments (e.g. str(Ari)).\n completion = completion[:-1]\n self.last_completion = completion\n\n if completion in (\n '0__dummy_completion__', '1__dummy_completion__'):\n return completion\n elif completion:\n # For every non-dummy completion, return a repeated dummy\n # one and print the real candidate so it can be retrieved\n # by comint output filters.\n if self.print_mode:\n print (completion)\n return '0__dummy_completion__'\n else:\n return completion\n else:\n return completion\n\n completer = readline.get_completer()\n\n if not completer:\n # Used as last resort to avoid breaking customizations.\n import rlcompleter\n completer = readline.get_completer()\n\n if completer and not getattr(completer, 'PYTHON_EL_WRAPPED', False):\n # Wrap the existing completer function only once.\n new_completer = __PYTHON_EL_Completer(completer)\n if not is_ipython:\n readline.set_completer(new_completer)\n else:\n # Try both initializations to cope with all IPython versions.\n # This works fine for IPython 3.x but not for earlier:\n readline.set_completer(new_completer)\n # IPython<3 hacks readline such that `readline.set_completer`\n # won't work. This workaround injects the new completer\n # function into the existing instance directly:\n instance = getattr(completer, 'im_self', completer.__self__)\n instance.rlcomplete = new_completer\n\n if readline.__doc__ and 'libedit' in readline.__doc__:\n raise Exception('''libedit based readline is known not to work,\n see etc/PROBLEMS under \"In Inferior Python mode, input is echoed\".''')\n readline.parse_and_bind('bind ^I rl_complete')\n else:\n readline.parse_and_bind('tab: complete')\n # Require just one tab to send output.\n readline.parse_and_bind('set show-all-if-ambiguous on')\n\n print ('python.el: native completion setup loaded')\n except:\n import sys\n print ('python.el: native completion setup failed, %s: %s'\n % sys.exc_info()[:2])\n\n__PYTHON_EL_native_completion_setup()" python-shell-accept-process-output re-search-backward "python\\.el: native completion setup loaded" nil t 1 python-shell-completion-native-try] 6 (#$ . 105951)]) #@101 Turn off shell native completions. With argument MSG show deactivation message. (fn &optional MSG) (defalias 'python-shell-completion-native-turn-off #[256 "\301 r\302!q\210\303\300!\210\304\205\305\306!)\207" [python-shell-completion-native-enable python-shell-get-process-or-error process-buffer make-local-variable nil message "Shell native completion is disabled, using fallback"] 4 (#$ . 111270) "p"]) #@100 Turn on shell native completions. With argument MSG show deactivation message. (fn &optional MSG) (defalias 'python-shell-completion-native-turn-on #[256 "\301 r\302!q\210\303\300!\210\304\305!)\207" [python-shell-completion-native-enable python-shell-get-process-or-error process-buffer make-local-variable t python-shell-completion-native-turn-on-maybe] 4 (#$ . 111690) "p"]) #@130 Turn on native completions if enabled and available. With argument MSG show activation/deactivation message. (fn &optional MSG) (defalias 'python-shell-completion-native-turn-on-maybe #[256 "\302 r\303!q\210\2057\304 \203\305!\2027\306 \203&\2057\307\310!\2027\311\312\313\314\315\316\317 !\"\320Q#\210\305!)\207" [python-shell-completion-native-enable python-shell-interpreter python-shell-get-process-or-error process-buffer python-shell-completion-native-interpreter-disabled-p python-shell-completion-native-turn-off python-shell-completion-native-setup message "Shell native completion is enabled." lwarn (python python-shell-completion-native-turn-on-maybe) :warning "Your `python-shell-interpreter' doesn't seem to support readline, yet `python-shell-completion-native-enable' " format "was t and %S is not part of the " file-name-nondirectory "`python-shell-completion-native-disabled-interpreters' list. Native completions have been disabled locally. "] 10 (#$ . 112079) "p"]) #@73 Like `python-shell-completion-native-turn-on-maybe' but force messages. (defalias 'python-shell-completion-native-turn-on-maybe-with-msg #[0 "\300\301!\207" [python-shell-completion-native-turn-on-maybe t] 2 (#$ . 113085)]) (add-hook 'python-shell-first-prompt-hook 'python-shell-completion-native-turn-on-maybe-with-msg) #@109 Toggle shell native completion. With argument MSG show activation/deactivation message. (fn &optional MSG) (defalias 'python-shell-completion-native-toggle #[256 "\301 r\302!q\210\203\303!\210\202\304!\210)\207" [python-shell-completion-native-enable python-shell-get-process-or-error process-buffer python-shell-completion-native-turn-off python-shell-completion-native-turn-on] 4 (#$ . 113414) "p"]) #@146 Get completions using native readline for PROCESS. When IMPORT is non-nil takes precedence over INPUT for completion. (fn PROCESS IMPORT INPUT) (defalias 'python-shell-completion-native-get-completions #[771 "r\306!q\210\206 \211\307!\310!\311P\212d\312 ZG\\)\313\314\"P\315\316 #\216rq\210\317 \210\320\211\211\321\322 #\323\324!G\325U\203W\326\n\327\324 \"\"\210\202]\326\n\324\"\210\330\n\"\210\331\n$\n#\205\200\332\333\320\321#\210\334\335\336\337 e\"\340\321#\341\342#.\266\207)\207" [python-shell-completion-native-redirect-buffer comint-redirect-output-buffer comint-redirect-finished-regexp comint-redirect-insert-matching-regexp comint-redirect-perform-sanity-check comint-redirect-completed process-buffer process-filter get-buffer-create " " comint-bol make-string 8 make-closure #[0 "\302\300\301\"\207" [V0 V1 set-process-filter] 3] erase-buffer nil t "1__dummy_completion__[[:space:]]*\n" help-function-arglist comint-redirect-filter 3 set-process-filter apply-partially process-send-string python-shell-accept-process-output re-search-backward "0__dummy_completion__" cl-remove-duplicates split-string buffer-substring-no-properties line-beginning-position "[ \f \n ()]+" :test string= comint-redirect-echo-input python-shell-completion-native-output-timeout] 16 (#$ . 113833)]) #@153 Do completion at point using PROCESS for IMPORT or INPUT. When IMPORT is non-nil takes precedence over INPUT for completion. (fn PROCESS IMPORT INPUT) (defalias 'python-shell-completion-get-completions #[771 "\206\211\262r\302!q\210\303\304\305\306 \307R\"\"!\211G\310V\205&\311\312\313#\262)\207" [python-shell-completion-setup-code python-shell-completion-string-code process-buffer python-util-strip-string python-shell-send-string-no-output format "\nprint (" ")" 2 split-string "^'\\|^\"\\|;\\|'$\\|\"$" t] 10 (#$ . 115169)]) #@210 Function for `completion-at-point-functions' in `inferior-python-mode'. Optional argument PROCESS forces completions to be retrieved using that one instead of current buffer's process. (fn &optional PROCESS) (defalias 'python-shell-completion-at-point #[256 "\211\206\305p!\262\306\307!\203\310 A\202\311 \312\313`\"\314\315\316#)\266\203\205.\313`\"\212\317\320\315\321$\204<\202C\322\323!Gu\210`)`r\324!q\210\310 )r\324!q\210\211\205_\313@A\")r\324!q\210\211\203r`AW\203v\325\202\251 \203\212\n\314\315\316#)\266\203\203\250 \232\204\240\f\314\315\316#)\266\203\203\244\325\202\251\326\202\251\327)\330\331\f #!E\207" [inhibit-changing-match-data python-shell-completion-native-enable python-shell-prompt-pdb-regexp python-shell--block-prompt python-shell-prompt-block-regexp get-buffer-process derived-mode-p inferior-python-mode python-util-comint-last-prompt line-beginning-position "[[:space:]]*\\<\\(?:from\\|import\\)\\>[[:space:]]" buffer-substring-no-properties nil t string-match re-search-backward "[[:space:]]\\|[([{]\\|[])}]\\|\\(?:[^\"'\\]\\|\\=\\|\\(?:[^\\]\\|\\=\\)\\\\\\(?:\\\\\\\\\\)*[\"']\\)\\(?:\\\\\\\\\\)*\\(\\(?:\"\"\"\\|'''\\|[\"']\\)\\)\\|[%&*+/<->^|~-]" 1 match-string-no-properties 0 process-buffer ignore python-shell-completion-get-completions python-shell-completion-native-get-completions completion-table-dynamic apply-partially] 15 (#$ . 115719)]) (byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias python-shell-completion-complete-at-point python-shell-completion-at-point nil make-obsolete "25.1"] 4) #@123 Complete or indent depending on the context. If content before pointer is all whitespace, indent. If not try to complete. (defalias 'python-shell-completion-complete-or-indent #[0 "\300\301\302 `{\"\203 \303 \207\304 \207" [string-match "^[[:space:]]*$" comint-line-beginning-position indent-for-tab-command completion-at-point] 4 (#$ . 117331) nil]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \210\300\314\302\303\315DD\316\306\317\320\321\312\322& \210\300\323\302\303\324DD\325\306\326\320\321&\210\300\327\302\303\330DD\331\306\332\320\321&\210\300\333\302\303\334DD\335\306\307\320\321&\207" [custom-declare-variable python-pdbtrack-activate funcall function #[0 "\300\207" [t] 1] "Non-nil makes Python shell enable pdbtracking.\nPdbtracking would open the file for current stack frame found in pdb output by\n`python-pdbtrack-stacktrace-info-regexp' and add overlay arrow in currently\ninspected line in that file.\n\nAfter the command listed in `python-pdbtrack-continue-command' or\n`python-pdbtrack-exit-command' is sent to pdb, the pdbtracking session is\nconsidered over. The overlay arrow will be removed from the currently tracked\nbuffer. Additionally, if `python-pdbtrack-kill-buffers' is non-nil, all\nfiles opened by pdbtracking will be killed." :type boolean :group python :safe booleanp python-pdbtrack-stacktrace-info-regexp #[0 "\300\207" [#1="> \\([^\"(]+\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()"] 1 #1#] "Regular expression matching stacktrace information.\nUsed to extract the current line and module being inspected.\n\nMust match lines with real filename, like\n > /path/to/file.py(42)()->None\nand lines in which filename starts with `<', e.g.\n > (1)()->None\n\nIn the first case /path/to/file.py file will be visited and overlay icon\nwill be placed in line 42.\nIn the second case pdbtracking session will be considered over because\nthe top stack frame has been reached.\n\nFilename is expected in the first parenthesized expression.\nLine number is expected in the second parenthesized expression." regexp :version "27.1" stringp python-pdbtrack-continue-command #[0 "\300\207" [("c" "cont" "continue")] 1] "Pdb `continue' command aliases.\nAfter one of these commands is sent to pdb, the pdbtracking session is\nconsidered over.\n\nThis command is remembered by pdbtracking. If the next command sent to pdb\nis the empty string, it is treated as `continue' if the previous command\nwas `continue'. This behavior slightly differentiates the `continue' command\nfrom the `exit' command listed in `python-pdbtrack-exit-command'.\n\nSee `python-pdbtrack-activate' for pdbtracking session overview." (repeat string) python-pdbtrack-exit-command #[0 "\300\207" [("q" "quit" "exit")] 1] "Pdb `exit' command aliases.\nAfter one of this commands is sent to pdb, pdbtracking session is\nconsidered over.\n\nSee `python-pdbtrack-activate' for pdbtracking session overview." (repeat string) python-pdbtrack-kill-buffers #[0 "\300\207" [t] 1] "If non-nil, kill buffers when pdbtracking session is over.\nOnly buffers opened by pdbtracking will be killed.\n\nSee `python-pdbtrack-activate' for pdbtracking session overview."] 10) #@146 Variable containing the value of the current tracked buffer. Never set this variable directly, use `python-pdbtrack-set-tracked-buffer' instead. (defvar python-pdbtrack-tracked-buffer nil (#$ . 120540)) #@56 List of buffers to be deleted after tracking finishes. (defvar python-pdbtrack-buffers-to-kill nil (#$ . 120749)) #@46 Is t if previous pdb command was `continue'. (defvar python-pdbtrack-prev-command-continue nil (#$ . 120869)) #@163 Set the buffer for FILE-NAME as the tracked buffer. Internally it uses the `python-pdbtrack-tracked-buffer' variable. Returns the tracked buffer. (fn FILE-NAME) (defalias 'python-pdbtrack-set-tracked-buffer #[257 "\304!P\305!\211\204?\306!\203\307!\262\202+\232\204+\306!\203+\307!\262 \203?\211\n\235\204?\211\n\235\204?\211\nB\211\207" [default-directory python-pdbtrack-kill-buffers python-pdbtrack-buffers-to-kill python-pdbtrack-tracked-buffer file-remote-p get-file-buffer file-exists-p find-file-noselect] 5 (#$ . 120986)]) #@35 Untrack currently tracked buffer. (defalias 'python-pdbtrack-unset-tracked-buffer #[0 "\302!\203rq\210 \303\211\223\210)\303\211\207" [python-pdbtrack-tracked-buffer overlay-arrow-position buffer-live-p nil] 3 (#$ . 121546)]) #@18 Finish tracking. (defalias 'python-pdbtrack-tracking-finish #[0 "\302 \210\203\f\303\304 \"\210\305\211\207" [python-pdbtrack-kill-buffers python-pdbtrack-buffers-to-kill python-pdbtrack-unset-tracked-buffer mapc #[257 "\3001 \301!0\207\210\302\207" [(error) kill-buffer nil] 3 "\n\n(fn BUFFER)"] nil] 3 (#$ . 121783)]) #@61 Untrack buffers when PROCESS is killed. (fn PROCESS EVENT) (defalias 'python-pdbtrack-process-sentinel #[514 "\300!?\205\301!\302!\205r\211q\210\303 )\262\207" [process-live-p process-buffer buffer-live-p python-pdbtrack-tracking-finish] 5 (#$ . 122114)]) #@161 Finish tracking session depending on command in INPUT. Commands that must finish the tracking session are listed in `python-pdbtrack-exit-command'. (fn INPUT) (defalias 'python-pdbtrack-comint-input-filter-function #[257 "\2053\211\211\304\230\262\2041\305\306!\307\"@\211 \235\206$\211\211\304\230\262\205$\n\211\206,\211 \235\262\2053\310 \207" [python-pdbtrack-tracked-buffer python-pdbtrack-continue-command python-pdbtrack-prev-command-continue python-pdbtrack-exit-command "" split-string string-trim " " python-pdbtrack-tracking-finish] 6 (#$ . 122386)]) #@141 Move overlay arrow to current pdb line in tracked buffer. Argument OUTPUT is a string with the output from the comint process. (fn OUTPUT) (defalias 'python-pdbtrack-comint-output-filter-function #[257 "\203\221\211\305\230\204\221\306 d{!\307\310\311\312\"r\211q\210\313\314\"\216c\210db\210\315 b\210\316\n!\205?\317 \307\312#\205?\320\321\322!!\262\321\323!*\262\211\203\217\203\217\324\325\"\203V\326 \266\207\327 \210\330!p\331!\307rq\210\332\304!\210\333 eb\210Sy\210\334 \262\203\200\335\"\210\f\307\223\210)\336!\210\337!\266\266\207" [python-pdbtrack-activate comint-last-input-end python-shell-prompt-pdb-regexp python-pdbtrack-stacktrace-info-regexp overlay-arrow-position "" ansi-color-filter-apply nil generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] line-beginning-position looking-at re-search-backward string-to-number match-string-no-properties 2 1 string-prefix-p "<" python-pdbtrack-tracking-finish python-pdbtrack-unset-tracked-buffer python-pdbtrack-set-tracked-buffer get-buffer-window make-local-variable make-marker point-marker set-window-point pop-to-buffer switch-to-buffer-other-window] 11 (#$ . 122968)]) #@39 Setup pdb tracking in current buffer. (defalias 'python-pdbtrack-setup-tracking #[0 "\300\301!\210\300\302!\210\303\304\305\306\307$\210\310\300\311!\312\"\210\313\314\315p!\316\317\"\316\320\"B\262\321\306$\210\303\322\323\306\307$\207" [make-local-variable python-pdbtrack-buffers-to-kill python-pdbtrack-tracked-buffer add-hook comint-input-filter-functions python-pdbtrack-comint-input-filter-function nil t add-to-list comint-output-filter-functions python-pdbtrack-comint-output-filter-function advice--add-function :before get-buffer-process make-closure #[0 "\301\300!\207" [V0 process-sentinel] 2] #[257 "\301\300\"\207" [V0 set-process-sentinel] 4 "\n\n(fn GV--VAL)"] python-pdbtrack-process-sentinel kill-buffer-hook python-pdbtrack-tracking-finish] 7 (#$ . 124202)]) #@221 Function for `completion-at-point-functions' in `python-mode'. For this to work as best as possible you should call `python-shell-send-buffer' from time to time so context in inferior Python process is updated properly. (defalias 'python-completion-at-point #[0 "\300 \211\205 \301!\207" [python-shell-get-process python-shell-completion-at-point] 3 (#$ . 124992)]) (byte-code "\300\301\302\303#\210\304\301\302\305#\210\306\307\310\311\312DD\313\314\315\316\317&\210\306\320\310\311\321DD\322\314\315\316\317&\210\306\323\310\311\324DD\325\314\315\316\317&\210\306\326\310\311\327DD\330\314\315\316\317&\210\306\331\310\311\332DD\333\314\334\316\317\335\336& \207" [defalias python-completion-complete-at-point python-completion-at-point nil make-obsolete "25.1" custom-declare-variable python-fill-comment-function funcall function #[0 "\300\207" [python-fill-comment] 1] "Function to fill comments.\nThis is the function used by `python-fill-paragraph' to\nfill comments." :type symbol :group python python-fill-string-function #[0 "\300\207" [python-fill-string] 1] "Function to fill strings.\nThis is the function used by `python-fill-paragraph' to\nfill strings." python-fill-decorator-function #[0 "\300\207" [python-fill-decorator] 1] "Function to fill decorators.\nThis is the function used by `python-fill-paragraph' to\nfill decorators." python-fill-paren-function #[0 "\300\207" [python-fill-paren] 1] "Function to fill parens.\nThis is the function used by `python-fill-paragraph' to\nfill parens." python-fill-docstring-style #[0 "\300\207" [pep-257] 1] "Style used to fill docstrings.\nThis affects `python-fill-string' behavior with regards to\ntriple quotes positioning.\n\nPossible values are `django', `onetwo', `pep-257', `pep-257-nn',\n`symmetric', and nil. A value of nil won't care about quotes\nposition and will treat docstrings a normal string, any other\nvalue may result in one of the following docstring styles:\n\n`django':\n\n \"\"\"\n Process foo, return bar.\n \"\"\"\n\n \"\"\"\n Process foo, return bar.\n\n If processing fails throw ProcessingError.\n \"\"\"\n\n`onetwo':\n\n \"\"\"Process foo, return bar.\"\"\"\n\n \"\"\"\n Process foo, return bar.\n\n If processing fails throw ProcessingError.\n\n \"\"\"\n\n`pep-257':\n\n \"\"\"Process foo, return bar.\"\"\"\n\n \"\"\"Process foo, return bar.\n\n If processing fails throw ProcessingError.\n\n \"\"\"\n\n`pep-257-nn':\n\n \"\"\"Process foo, return bar.\"\"\"\n\n \"\"\"Process foo, return bar.\n\n If processing fails throw ProcessingError.\n \"\"\"\n\n`symmetric':\n\n \"\"\"Process foo, return bar.\"\"\"\n\n \"\"\"\n Process foo, return bar.\n\n If processing fails throw ProcessingError.\n \"\"\"" (choice (const :tag "Don't format docstrings" nil) (const :tag "Django's coding standards style." django) (const :tag "One newline and start and Two at end style." onetwo) (const :tag "PEP-257 with 2 newlines at end of string." pep-257) (const :tag "PEP-257 with 1 newline at end of string." pep-257-nn) (const :tag "Symmetric style." symmetric)) :safe #[257 "\211\300>\207" [(django onetwo pep-257 pep-257-nn symmetric nil)] 3 "\n\n(fn VAL)"]] 10) #@339 `fill-paragraph-function' handling multi-line strings and possibly comments. If any of the current line is in or at the end of a multi-line string, fill the string or the paragraph of it that point is in, preserving the string's indentation. Optional argument JUSTIFY defines if the paragraph should be justified. (fn &optional JUSTIFY) (defalias 'python-fill-paragraph #[256 "\212\304 \3058\205\f\3068\262\203!\202i\212\304 \3078\205#\3068\262\206-\310`!\311\232)\2037 !\202i\212\312 )f\313=\203G\n!\202i\304 A@\204b\314\315!\204b\212\316\317\320 \"\210\314\315!)\203h !\202i\321)\207" [python-fill-comment-function python-fill-string-function python-fill-decorator-function python-fill-paren-function syntax-ppss 4 8 3 syntax-after (15) python-nav-beginning-of-statement 64 looking-at "[([{]" skip-syntax-forward "^(" line-end-position t] 4 (#$ . 128224) "P"]) #@139 Comment fill function for `python-fill-paragraph'. JUSTIFY should be used (if applicable) as in `fill-paragraph'. (fn &optional JUSTIFY) (defalias 'python-fill-comment #[256 "\300!\207" [fill-comment-paragraph] 3 (#$ . 129120)]) #@138 String fill function for `python-fill-paragraph'. JUSTIFY should be used (if applicable) as in `fill-paragraph'. (fn &optional JUSTIFY) (defalias 'python-fill-string #[256 "\302 \303 \3048\205 \3058\262\206\306`!\307\232\205`\310\223\211f\310\311\211\304W\203D\2034\\W\203D\\f=\203D\211T\262\202\"\266\203\212\\b\210\312\313\310\314#\204Wdb\210\315 )\316\317#\311V\320\267\202\225\321\211B\202\226\211\205\226\321\322B\202\226\211\205\226\310\322B\202\226\211\205\226\310\321B\202\226\211\205\226\321\211B\202\226\310\310\214}\210\323!\210)\212\324 \203\361\203\361\\b\210`\325\326!\210`|\210\211@\203\307\327@!\210\330 \210dU\204\323Z\202\324b\210`\331\326!\210`|\210\211A\203\361dU\204\361\327A!\210\330 \210*\266\314\207" [python-fill-docstring-style fill-paragraph-function make-marker syntax-ppss 3 8 syntax-after (15) nil 0 re-search-forward "\\s|" t point-marker count-matches "\n" #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (django 103 onetwo 109 pep-257 119 pep-257-nn 129 symmetric 139)) 1 2 fill-paragraph python-info-docstring-p skip-syntax-forward "> " newline indent-according-to-mode skip-syntax-backward] 9 (#$ . 129358)]) #@141 Decorator fill function for `python-fill-paragraph'. JUSTIFY should be used (if applicable) as in `fill-paragraph'. (fn &optional JUSTIFY) (defalias 'python-fill-decorator #[256 "\300\207" [t] 2 (#$ . 130608)]) #@137 Paren fill function for `python-fill-paragraph'. JUSTIFY should be used (if applicable) as in `fill-paragraph'. (fn &optional JUSTIFY) (defalias 'python-fill-paren #[256 "\214\303 A@\203`Sb\210\202\304 \303 A@\204&\305\210\303 A@\204&\306\307!\210\303 A@\2038m\2048`Tb\210\202&`}\210\310\311\305eb\210\312!\210+m\204Z\313y\210\314 \210\315 b\210\202I)\316\207" [fill-paragraph-function paragraph-separate paragraph-start syntax-ppss line-beginning-position nil skip-syntax-backward "^)" "\f\\|[ ]*$" "," fill-paragraph 1 python-indent-line line-end-position t] 4 (#$ . 130827)]) #@64 Like `do-auto-fill', but bind `fill-indent-according-to-mode'. (defalias 'python-do-auto-fill #[0 "\301\302 )\207" [fill-indent-according-to-mode t do-auto-fill] 1 (#$ . 131430)]) (byte-code "\300\301\302\303#\210\304\211\203(\211@\301N\203!\302N\204!\305\302\301N#\210A\266\202\202\210\306\301\302\307#\210\310\302\311\312\313DD\314\315\316\317\320\321\322& \207" [defvaralias python-use-skeletons python-skeleton-autoinsert nil (saved-value saved-variable-comment) put make-obsolete-variable "24.3" custom-declare-variable funcall function #[0 "\300\207" [nil] 1] "Non-nil means template skeletons will be automagically inserted.\nThis happens when pressing \"if\", for example, to prompt for\nthe if condition." :type boolean :group python :safe booleanp] 10) #@39 Internal list of available skeletons. (defvar python-skeleton-available nil (#$ . 132217)) (define-abbrev-table 'python-mode-skeleton-abbrev-table nil "Abbrev table for Python mode skeletons." :case-fixed t :regexp "\\(?:^\\|[^/]\\)\\<\\([[:word:]/]+\\)\\W*" :enable-function #[0 "\301\302\206\303 8\262?\205\207" [python-skeleton-autoinsert nil 8 syntax-ppss] 3]) #@193 Define a `python-mode' skeleton using NAME DOC and SKEL. The skeleton will be bound to python-skeleton-NAME and will be added to `python-mode-skeleton-abbrev-table'. (fn NAME DOC &rest SKEL) (defalias 'python-skeleton-define '(macro . #[642 "\300!\301\302P!\303\304\305\306\307D\310BBBBB\311\312\313\307D\314BBE\315\206.\316\317\"BBBF\207" [symbol-name intern "python-skeleton-" progn define-abbrev python-mode-skeleton-abbrev-table "" quote (:system t) setq python-skeleton-available cons (python-skeleton-available) define-skeleton format "Insert %s statement."] 13 (#$ . 132596)])) (byte-code "\301\302\303\304#\305\306\307\310\311C%\207" [python-mode-skeleton-abbrev-table function-put python-skeleton-define lisp-indent-function 2 define-abbrev-table python-mode-abbrev-table nil "Abbrev table for Python mode." :parents] 7) #@156 Define a `python-mode' auxiliary skeleton using NAME DOC and SKEL. The skeleton will be bound to python-skeleton-NAME. (fn NAME &optional DOC &rest SKEL) (defalias 'python-define-auxiliary-skeleton '(macro . #[641 "\300!\301\302P!\303\304!\203\304\202\305\306\"\204$\307\305\310\"\311BB\262\312\2060\305\313\"\314\315\316D\317BBBBBBB\207" [symbol-name intern "python-skeleton--" fboundp format-message format "Add `%s' clause? " < "%s:" (n n > _ n) define-skeleton "Auxiliary skeleton for %s statement." nil unless y-or-n-p ((signal 'quit t))] 13 (#$ . 133450)])) (byte-code "\300\301\302\303#\304\305\306\307#\207" [function-put python-define-auxiliary-skeleton lisp-indent-function 2 put python-skeleton--else no-self-insert t] 5) #@567 Auxiliary skeleton for else statement. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'python-skeleton--else #[512 "\304 \305\211\305C\306\307#\216\310!\210\311\312#\313\240\210,\207" [most-positive-fixnum undo-strong-limit undo-limit undo-outer-limit prepare-change-group nil make-closure #[0 "\301\242\203 \302\300!\207\303\300!\207" [V0 V1 accept-change-group cancel-change-group] 2] activate-change-group skeleton-proxy-new (nil (unless (y-or-n-p "Add ‘else’ clause? ") (signal 'quit t)) < "else:" n n > _ n) t] 11 (#$ . 134212) "*P\nP"]) (put 'python-skeleton--except 'no-self-insert t) #@569 Auxiliary skeleton for except statement. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'python-skeleton--except #[512 "\304 \305\211\305C\306\307#\216\310!\210\311\312#\313\240\210,\207" [most-positive-fixnum undo-strong-limit undo-limit undo-outer-limit prepare-change-group nil make-closure #[0 "\301\242\203 \302\300!\207\303\300!\207" [V0 V1 accept-change-group cancel-change-group] 2] activate-change-group skeleton-proxy-new (nil (unless (y-or-n-p "Add ‘except’ clause? ") (signal 'quit t)) < "except:" n n > _ n) t] 11 (#$ . 135322) "*P\nP"]) (put 'python-skeleton--finally 'no-self-insert t) #@570 Auxiliary skeleton for finally statement. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'python-skeleton--finally #[512 "\304 \305\211\305C\306\307#\216\310!\210\311\312#\313\240\210,\207" [most-positive-fixnum undo-strong-limit undo-limit undo-outer-limit prepare-change-group nil make-closure #[0 "\301\242\203 \302\300!\207\303\300!\207" [V0 V1 accept-change-group cancel-change-group] 2] activate-change-group skeleton-proxy-new (nil (unless (y-or-n-p "Add ‘finally’ clause? ") (signal 'quit t)) < "finally:" n n > _ n) t] 11 (#$ . 136441) "*P\nP"]) (byte-code "\302\303\304\305\306\307&\210\305 B\310\305\311\307#\207" [python-mode-skeleton-abbrev-table python-skeleton-available define-abbrev "if" "" python-skeleton-if :system t put no-self-insert] 7) #@549 Insert if statement. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'python-skeleton-if #[512 "\304 \305\211\305C\306\307#\216\310!\210\311\312#\313\240\210,\207" [most-positive-fixnum undo-strong-limit undo-limit undo-outer-limit prepare-change-group nil make-closure #[0 "\301\242\203 \302\300!\207\303\300!\207" [V0 V1 accept-change-group cancel-change-group] 2] activate-change-group skeleton-proxy-new ("Condition: " "if " str ":" n _ n ("other condition, %s: " < "elif " str ":" n > _ n nil) '(python-skeleton--else) | ^) t] 11 (#$ . 137722) "*P\nP"]) (byte-code "\302\303\304\305\306\307&\210\305 B\310\305\311\307#\207" [python-mode-skeleton-abbrev-table python-skeleton-available define-abbrev "while" "" python-skeleton-while :system t put no-self-insert] 7) #@552 Insert while statement. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'python-skeleton-while #[512 "\304 \305\211\305C\306\307#\216\310!\210\311\312#\313\240\210,\207" [most-positive-fixnum undo-strong-limit undo-limit undo-outer-limit prepare-change-group nil make-closure #[0 "\301\242\203 \302\300!\207\303\300!\207" [V0 V1 accept-change-group cancel-change-group] 2] activate-change-group skeleton-proxy-new ("Condition: " "while " str ":" n > _ n '(python-skeleton--else) | ^) t] 11 (#$ . 139008) "*P\nP"]) (byte-code "\302\303\304\305\306\307&\210\305 B\310\305\311\307#\207" [python-mode-skeleton-abbrev-table python-skeleton-available define-abbrev "for" "" python-skeleton-for :system t put no-self-insert] 7) #@550 Insert for statement. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'python-skeleton-for #[512 "\304 \305\211\305C\306\307#\216\310!\210\311\312#\313\240\210,\207" [most-positive-fixnum undo-strong-limit undo-limit undo-outer-limit prepare-change-group nil make-closure #[0 "\301\242\203 \302\300!\207\303\300!\207" [V0 V1 accept-change-group cancel-change-group] 2] activate-change-group skeleton-proxy-new ("Iteration spec: " "for " str ":" n > _ n '(python-skeleton--else) | ^) t] 11 (#$ . 140245) "*P\nP"]) (byte-code "\302\303\304\305\306\307&\210\305 B\310\305\311\307#\207" [python-mode-skeleton-abbrev-table python-skeleton-available define-abbrev "import" "" python-skeleton-import :system t put no-self-insert] 7) #@553 Insert import statement. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'python-skeleton-import #[512 "\304 \305\211\305C\306\307#\216\310!\210\311\312#\313\240\210,\207" [most-positive-fixnum undo-strong-limit undo-limit undo-outer-limit prepare-change-group nil make-closure #[0 "\301\242\203 \302\300!\207\303\300!\207" [V0 V1 accept-change-group cancel-change-group] 2] activate-change-group skeleton-proxy-new ("Import from module: " "from " str & " " | -5 "import " ("Identifier: " str ", ") -2 n _) t] 11 (#$ . 141487) "*P\nP"]) (byte-code "\302\303\304\305\306\307&\210\305 B\310\305\311\307#\207" [python-mode-skeleton-abbrev-table python-skeleton-available define-abbrev "try" "" python-skeleton-try :system t put no-self-insert] 7) #@550 Insert try statement. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'python-skeleton-try #[512 "\304 \305\211\305C\306\307#\216\310!\210\311\312#\313\240\210,\207" [most-positive-fixnum undo-strong-limit undo-limit undo-outer-limit prepare-change-group nil make-closure #[0 "\301\242\203 \302\300!\207\303\300!\207" [V0 V1 accept-change-group cancel-change-group] 2] activate-change-group skeleton-proxy-new (nil "try:" n > _ n ("Exception, %s: " < "except " str ":" n > _ n nil) resume: '(python-skeleton--except) '(python-skeleton--else) '(python-skeleton--finally) | ^) t] 11 (#$ . 142747) "*P\nP"]) (byte-code "\302\303\304\305\306\307&\210\305 B\310\305\311\307#\207" [python-mode-skeleton-abbrev-table python-skeleton-available define-abbrev "def" "" python-skeleton-def :system t put no-self-insert] 7) #@550 Insert def statement. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'python-skeleton-def #[512 "\304 \305\211\305C\306\307#\216\310!\210\311\312#\313\240\210,\207" [most-positive-fixnum undo-strong-limit undo-limit undo-outer-limit prepare-change-group nil make-closure #[0 "\301\242\203 \302\300!\207\303\300!\207" [V0 V1 accept-change-group cancel-change-group] 2] activate-change-group skeleton-proxy-new ("Function name: " "def " str "(" ("Parameter, %s: " (unless (equal 40 (char-before)) ", ") str) "):" n "\"\"\"" - "\"\"\"" n > _ n) t] 11 (#$ . 144075) "*P\nP"]) (byte-code "\302\303\304\305\306\307&\210\305 B\310\305\311\307#\207" [python-mode-skeleton-abbrev-table python-skeleton-available define-abbrev "class" "" python-skeleton-class :system t put no-self-insert] 7) #@552 Insert class statement. This is a skeleton command (see `skeleton-insert'). Normally the skeleton text is inserted at point, with nothing "inside". If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. This is a way of overriding the use of a highlighted region. (fn &optional STR ARG) (defalias 'python-skeleton-class #[512 "\304 \305\211\305C\306\307#\216\310!\210\311\312#\313\240\210,\207" [most-positive-fixnum undo-strong-limit undo-limit undo-outer-limit prepare-change-group nil make-closure #[0 "\301\242\203 \302\300!\207\303\300!\207" [V0 V1 accept-change-group cancel-change-group] 2] activate-change-group skeleton-proxy-new ("Class name: " "class " str "(" ("Inheritance, %s: " (unless (equal 40 (char-before)) ", ") str) & ")" | -1 ":" n "\"\"\"" - "\"\"\"" n > _ n) t] 11 (#$ . 145375) "*P\nP"]) #@43 Add menu items to Python->Skeletons menu. (defalias 'python-skeleton-add-menu-items #[0 "\301\302\"\211\211\205+\211@\303\304\305\306\307\310\311\312\313\314\n!\315\"8\"\316BB\"#\210A\266\202\202\207" [python-skeleton-available sort string< easy-menu-add-item nil ("Python" "Skeletons") apply vector format "Insert %s" 2 split-string symbol-name "-" (t)] 14 (#$ . 146475)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\311&\207" [custom-declare-variable python-ffap-setup-code funcall function #[0 "\300\207" [#1="\ndef __FFAP_get_module_path(objstr):\n try:\n import inspect\n import os.path\n # NameError exceptions are delayed until this point.\n obj = eval(objstr)\n module = inspect.getmodule(obj)\n filename = module.__file__\n ext = os.path.splitext(filename)[1]\n if ext in ('.pyc', '.pyo'):\n # Point to the source file.\n filename = filename[:-1]\n if os.path.exists(filename):\n return filename\n return ''\n except:\n return ''"] 1 #1#] "Python code to get a module path." :type string :group python python-ffap-string-code #[0 "\300\207" [#2="__FFAP_get_module_path('''%s''')"] 1 #2#] "Python code used to get a string with the path of a module."] 8) #@67 Function for `ffap-alist' to return path for MODULE. (fn MODULE) (defalias 'python-ffap-module-path #[257 "\302\303!\203\f\304p!\206\305 \211\205+\306\307\310 \"\311R\"\211G\312U?\205)\313!\262\207" [python-ffap-setup-code python-ffap-string-code derived-mode-p inferior-python-mode get-buffer-process python-shell-get-process python-shell-send-string-no-output "\nprint (" format ")" 0 python-util-strip-string] 8 (#$ . 147824)]) (byte-code "\300\301\302\"\210\303\304\305\306\307DD\310\311\312\313\314&\210\303\315\305\306\316DD\317\311\312\313\314&\207" [eval-after-load "ffap" #[0 "\301B\302B\211\207" [ffap-alist (python-mode . python-ffap-module-path) (inferior-python-mode . python-ffap-module-path)] 2] custom-declare-variable python-check-command funcall function #[0 "\300\301!\206 \300\302!\206 \303\207" [executable-find "pyflakes" "epylint" "install pyflakes, pylint or something else"] 2] "Command used to check a Python file." :type string :group python python-check-buffer-name #[0 "\300\207" [#1="*Python check: %s*"] 1 #1#] "Buffer name used for check commands."] 8) #@15 Internal use. (defvar python-check-custom-command nil (#$ . 148935)) (make-variable-buffer-local 'python-check-custom-command) #@163 Check a Python file (default current buffer's file). Runs COMMAND, a shell command, as if by `compile'. See `python-check-command' for the default. (fn COMMAND) (defalias 'python-check #[257 "\211\306 ?\307\"\210\310\n!\205\3111\312\n\313\"0\202\210\307\211\203$ \202&\314 \211\203/\f\2021\315 \211\203;\314 \202< \316!\203N\317\315 \"\210\320 \"\210\321\307\322\323\"#+\207" [python-check-custom-command compilation-ask-about-save default-directory process-environment exec-path tramp-remote-process-environment save-some-buffers nil file-remote-p (error) tramp-dissect-file-name noexpand python-shell-calculate-process-environment python-shell-calculate-exec-path tramp-get-connection-process python-shell-tramp-refresh-remote-path python-shell-tramp-refresh-process-environment compilation-start make-closure #[257 "\302 \300\"\207" [V0 python-check-buffer-name format] 4 "\n\n(fn MODENAME)"]] 8 (#$ . 149069) (byte-code "\302\303\206 \304\305\306 \211\205\307!\262\206\310!Q\"C\207" [python-check-custom-command python-check-command read-string "Check command: " " " shell-quote-argument buffer-file-name file-name-nondirectory ""] 8)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\311&\207" [custom-declare-variable python-eldoc-setup-code funcall function #[0 "\300\207" [#1="def __PYDOC_get_help(obj):\n try:\n import inspect\n try:\n str_type = basestring\n argspec_function = inspect.getargspec\n except NameError:\n str_type = str\n argspec_function = inspect.getfullargspec\n if isinstance(obj, str_type):\n obj = eval(obj, globals())\n doc = inspect.getdoc(obj)\n if not doc and callable(obj):\n target = None\n if inspect.isclass(obj) and hasattr(obj, '__init__'):\n target = obj.__init__\n objtype = 'class'\n else:\n target = obj\n objtype = 'def'\n if target:\n args = inspect.formatargspec(*argspec_function(target))\n name = obj.__name__\n doc = '{objtype} {name}{args}'.format(\n objtype=objtype, name=name, args=args\n )\n else:\n doc = doc.splitlines()[0]\n except:\n doc = ''\n return doc"] 1 #1#] "Python code to setup documentation retrieval." :type string :group python python-eldoc-string-code #[0 "\300\207" [#2="__PYDOC_get_help('''%s''')"] 1 #2#] "Python code used to get a string with the documentation of an object."] 8) #@95 Get the current symbol for eldoc. Returns the current symbol handling point within arguments. (defalias 'python-eldoc--get-symbol-at-point #[0 "\212\300 A@\211\203\f\211b\210\211\204m\204\301fz\302>\203 \303\304!\210\210\305\306!)\207" [syntax-ppss nil (32 45) python-util-forward-comment -1 python-info-current-symbol t] 3 (#$ . 151729)]) #@276 Internal implementation to get documentation at point. If not FORCE-INPUT is passed then what `python-eldoc--get-symbol-at-point' returns will be used. If not FORCE-PROCESS is passed what `python-shell-get-process' returns is used. (fn &optional FORCE-INPUT FORCE-PROCESS) (defalias 'python-eldoc--get-doc-at-point #[512 "\211\206\302 \211\205-\206\303 \211\205\"\304\305\306\307 \"\310R\"!\211G\311U?\205+\211\266\202\207" [python-eldoc-setup-code python-eldoc-string-code python-shell-get-process python-eldoc--get-symbol-at-point python-util-strip-string python-shell-send-string-no-output "\nprint(" format ")" 0] 11 (#$ . 152082)]) #@207 Non-nil means eldoc should fetch the documentation automatically. Set to nil by `python-eldoc-function' if `python-eldoc-function-timeout-permanent' is non-nil and `python-eldoc-function' times out. (defvar python-eldoc-get-doc t (#$ . 152740)) (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313\314\315& \210\302\316\304\305\317DD\320\310\311\312\321\314\315& \207" [make-variable-buffer-local python-eldoc-get-doc custom-declare-variable python-eldoc-function-timeout funcall function #[0 "\300\207" [1] 1] "Timeout for `python-eldoc-function' in seconds." :group python :type integer :version "25.1" python-eldoc-function-timeout-permanent #[0 "\300\207" [t] 1] "Non-nil means that when `python-eldoc-function' times out\n`python-eldoc-get-doc' will be set to nil." boolean] 10) #@557 `eldoc-documentation-function' for Python. For this to work as best as possible you should call `python-shell-send-buffer' from time to time so context in inferior Python process is updated properly. If `python-eldoc-function-timeout' seconds elapse before this function returns then if `python-eldoc-function-timeout-permanent' is non-nil `python-eldoc-get-doc' will be set to nil and eldoc will no longer return the documentation at the point automatically. Set `python-eldoc-get-doc' to t to reenable eldoc documentation fetching. (fn &rest IGNORED) (defalias 'python-eldoc-function #[128 "\2059\3042\305 \306\307#\211\nB\310\311\"\216\312 *\2620\211\304=\2036 \2030\313\314!\210\306\211\2027\313\315!\2027\211\262\207" [python-eldoc-get-doc python-eldoc-function-timeout with-timeout-timers python-eldoc-function-timeout-permanent #1=#:timeout run-with-timer nil #[0 "\300\301\211\"\207" [throw #1#] 3] make-closure #[0 "\301\300!\207" [V0 cancel-timer] 2] python-eldoc--get-doc-at-point message "ElDoc echo-area display muted in this buffer, see `python-eldoc-function'" "`python-eldoc-function' timed out, see `python-eldoc-function-timeout'"] 5 (#$ . 153553)]) #@81 Get help on SYMBOL using `help'. Interactively, prompt for symbol. (fn SYMBOL) (defalias 'python-eldoc-at-point #[257 "\300\301!!\207" [message python-eldoc--get-doc-at-point] 4 (#$ . 154743) (byte-code "\301 \302\303\304\305\"\306\211$)C\207" [enable-recursive-minibuffers python-eldoc--get-symbol-at-point t read-string format-prompt "Describe symbol" nil] 6)]) #@23 (fn SYMBOL PROCESS) (defalias 'python-describe-at-point #[514 "\300\301\302Q\"\207" [comint-send-string "help('" "')\n"] 7 (#$ . 155118) (byte-code "\300 \301 D\207" [python-info-current-symbol python-shell-get-process] 2)]) #@97 Python specific `forward-sexp' function for `hs-minor-mode'. Argument ARG is ignored. (fn ARG) (defalias 'python-hideshow-forward-sexp-function #[257 "\300 \210\301 ?\205 \302u\207" [python-nav-end-of-defun python-info-current-line-empty-p -1] 2 (#$ . 155353)]) #@103 Imenu function used to format an item label. It must be a function with two arguments: TYPE and NAME. (defvar python-imenu-format-item-label-function 'python-imenu-format-item-label (#$ . 155624)) #@109 Imenu function used to format a parent item label. It must be a function with two arguments: TYPE and NAME. (defvar python-imenu-format-parent-item-label-function 'python-imenu-format-parent-item-label (#$ . 155828)) #@114 Imenu function used to format a parent jump item label. It must be a function with two arguments: TYPE and NAME. (defvar python-imenu-format-parent-item-jump-label-function 'python-imenu-format-parent-item-jump-label (#$ . 156052)) #@73 Return Imenu label for single node using TYPE and NAME. (fn TYPE NAME) (defalias 'python-imenu-format-item-label #[514 "\300\301#\207" [format "%s (%s)"] 6 (#$ . 156290)]) #@73 Return Imenu label for parent node using TYPE and NAME. (fn TYPE NAME) (defalias 'python-imenu-format-parent-item-label #[514 "\300\301\302\"\"\207" [format "%s..." python-imenu-format-item-label] 7 (#$ . 156471)]) #@78 Return Imenu label for parent node jump using TYPE and NAME. (fn TYPE NAME) (defalias 'python-imenu-format-parent-item-jump-label #[514 "\300\230\203\301\207\302\207" ["class" "*class definition*" "*function definition*"] 4 (#$ . 156695)]) #@49 Return defun type and name at current position. (defalias 'python-imenu--get-defun-type-name #[0 "\301!\205$\302\303\304!!\211G\305U\203\211\202\"\211@\306A@Q\307!@D\262\207" [python-nav-beginning-of-defun-regexp looking-at split-string match-string-no-properties 0 2 " " last] 4 (#$ . 156945)]) #@74 Add the parent with TYPE, NAME and POS to TREE. (fn TYPE NAME POS TREE) (defalias 'python-imenu--put-parent #[1028 "\" \"\204B\207BBB\207" [python-imenu-format-item-label-function python-imenu-format-parent-item-jump-label-function] 9 (#$ . 157255)]) #@233 Recursively build the tree of nested definitions of a node. Arguments MIN-INDENT, PREV-INDENT and TREE are internal and should not be passed explicitly unless you know what you are doing. (fn &optional MIN-INDENT PREV-INDENT TREE) (defalias 'python-imenu--build-tree #[768 "\206\302\262\206\f\262\303 \211\205\304 \211@A@\211\205# \"\305  \\\2040\306\207\nX\203@\307  $\207\310\n\211X\203T\nB B\202c\310\f BC# B#\207" [python-indent-offset python-imenu-format-item-label-function 0 python-nav-backward-defun python-imenu--get-defun-type-name current-indentation nil python-imenu--put-parent python-imenu--build-tree] 18 (#$ . 157528)]) #@249 Return tree Imenu alist for the current Python buffer. Change `python-imenu-format-item-label-function', `python-imenu-format-parent-item-label-function', `python-imenu-format-parent-item-jump-label-function' to customize how labels are formatted. (defalias 'python-imenu-create-index #[0 "db\210\300\211\301 \211\262\203\211B\262\202\207" [nil python-imenu--build-tree] 4 (#$ . 158213)]) #@767 Return flat outline of the current Python buffer for Imenu. Optional argument ALIST is the tree to be flattened; when nil `python-imenu-create-index' is used with `python-imenu-format-parent-item-jump-label-function' `python-imenu-format-parent-item-label-function' `python-imenu-format-item-label-function' set to (lambda (type name) name) Optional argument PREFIX is used in recursive calls and should not be passed explicitly. Converts this: (("Foo" . 103) ("Bar" . 138) ("decorator" ("decorator" . 173) ("wrap" ("wrap" . 353) ("wrapped_f" . 393)))) To this: (("Foo" . 103) ("Bar" . 138) ("decorator" . 173) ("decorator.wrap" . 353) ("decorator.wrapped_f" . 393)) (fn &optional ALIST PREFIX) (defalias 'python-imenu-create-flat-index #[512 "\303\304\305\306\307\"\206\310\211\211\211\311 +\262\"\"\207" [python-imenu-format-item-label-function python-imenu-format-parent-item-label-function python-imenu-format-parent-item-jump-label-function apply nconc mapcar make-closure #[257 "\300\203\f\300\301@Q\202\211@A\211\247\204\302!\203 BC\207\211<\2051@AB\303AA\"B\207" [V0 "." markerp python-imenu-create-flat-index] 7 "\n\n(fn ITEM)"] #[514 "\207" [] 3 "\n\n(fn TYPE NAME)"] python-imenu-create-index] 8 (#$ . 158617)]) #@306 Return name of surrounding function with Python compatible dotty syntax. Optional argument INCLUDE-TYPE indicates to include the type of the defun. This function can be used as the value of `add-log-current-defun-function' since it returns nil if point is not inside a defun. (fn &optional INCLUDE-TYPE) (defalias 'python-info-current-defun #[256 "\214~\210\212\303\210\304\305 `\306\304\211\3072\273\310\303!\205\272\311 \312\313\"\216\203*\305 W\205r\203I\212\304\262b\210\314 \210\315\303!\210\306\316!)\262)\206r\212\305 \n\\W\203[\202n\317 \210`\305 Y\203l\305 T\202m\320\\\262)W)\262\203\253\311 \312\321\"\216\305 \262)\210\203\216\211\203\231\322\303!B\262\202\253\323\322\320!!\211@\262\211A@B\262\210\305 \320U\203\324\307\306\"\210\2020\210\205\317\211\205\310\325\326\"\327\330\331#P\266\206*\207" [python-nav-beginning-of-defun-regexp inhibit-changing-match-data python-indent-offset 1 nil current-indentation t exit python-nav-beginning-of-defun match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] python-nav-beginning-of-statement beginning-of-line looking-at python-nav-end-of-defun 0 #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] match-string-no-properties split-string throw format "%s " mapconcat identity "."] 13 (#$ . 159942)]) #@153 Return current symbol using dotty syntax. With optional argument REPLACE-SELF convert "self" to current parent defun name. (fn &optional REPLACE-SELF) (defalias 'python-info-current-symbol #[256 "\301\302\206\303 8\262?\205,\304 p\305\306#\216\307!\210\310 \211\205'\311\312!!\262)\266\202\211\205R\2045\207\313 \211\204?\202P\314\315\316\317\320\321\322\"!\323#\323P#\262\207" [python-dotty-syntax-table nil 8 syntax-ppss syntax-table make-closure #[0 "r\301q\210\302\300!)\207" [V0 V1 set-syntax-table] 2] set-syntax-table symbol-at-point substring-no-properties symbol-name python-info-current-defun replace-regexp-in-string "^\\\\." mapconcat identity butlast split-string "\\." "."] 11 (#$ . 161296)]) #@52 Return non-nil if current statement opens a block. (defalias 'python-info-statement-starts-block-p #[0 "\212\300 \210\301\302!)\207" [python-nav-beginning-of-statement looking-at "\\_<\\(?:def\\|class\\|if\\|elif\\|else\\|try\\|except\\|finally\\|for\\|while\\|with\\|async[[:space:]]+\\(?:def\\|for\\|with\\)\\)\\_>"] 2 (#$ . 162039)]) #@45 Return non-nil if point is at end of block. (defalias 'python-info-statement-ends-block-p #[0 "\212\300 )\212\301 )\205\211\205U\207" [python-nav-end-of-block python-nav-end-of-statement] 4 (#$ . 162382)]) #@55 Return non-nil if point is at beginning of statement. (defalias 'python-info-beginning-of-statement-p #[0 "`\212\300 \210`)U\207" [python-nav-beginning-of-statement] 2 (#$ . 162601)]) #@49 Return non-nil if point is at end of statement. (defalias 'python-info-end-of-statement-p #[0 "`\212\300 \210`)U\207" [python-nav-end-of-statement] 2 (#$ . 162791)]) #@51 Return non-nil if point is at beginning of block. (defalias 'python-info-beginning-of-block-p #[0 "\300 \205\301 \207" [python-info-beginning-of-statement-p python-info-statement-starts-block-p] 1 (#$ . 162963)]) #@45 Return non-nil if point is at end of block. (defalias 'python-info-end-of-block-p #[0 "\300 \205\301 \207" [python-info-end-of-statement-p python-info-statement-ends-block-p] 1 (#$ . 163184)]) (byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias python-info-closing-block python-info-dedenter-opening-block-position nil make-obsolete "24.4"] 4) #@225 Return the point of the closest block the current line closes. Returns nil if point is not on a dedenter statement or no opening block can be detected. The latter case meaning current file is likely an invalid python file. (defalias 'python-info-dedenter-opening-block-position #[0 "\300 \301 \302\211\204(\203(\212@b\210\301 X\203 @\262\202$A\262)\202\207" [python-info-dedenter-opening-block-positions current-indentation nil] 5 (#$ . 163551)]) #@231 Return points of blocks the current line may close sorted by closer. Returns nil if point is not on a dedenter statement or no opening block can be detected. The latter case meaning current file is likely an invalid python file. (defalias 'python-info-dedenter-opening-block-positions #[0 "\212\300 \211\205\217\211b\210\301 \302\303\304!\305\"A\306\211\3072\212\310\311\312\"\205\211\313 \211>\204z\2037\211\314\315\"W\203z\212\306y\210\316\317 \320\321\"\216` W\203_\313 V\206S\322 \211\262\203_\306y\210\202C)\210\211\262)\203z\211B\262\303\304!\235\203z`B\262\211\304U\203\205\323\307\306\"\210\210\2020\210\211\237\266\206\262)\207" [python-info-dedenter-statement-p line-beginning-position (("elif" "elif" "if") ("else" "if" "elif" "except" "for" "while") ("except" "except" "try") ("finally" "else" "except" "try")) match-string-no-properties 0 assoc-string nil exit python-nav--syntactically #[0 "\300\301\302\303#\207" [re-search-backward "\\_<\\(?:def\\|class\\|if\\|elif\\|else\\|try\\|except\\|finally\\|for\\|while\\|with\\|async[[:space:]]+\\(?:def\\|for\\|with\\)\\)\\_>" nil t] 4] < current-indentation apply min t match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] python-info-current-line-empty-p throw] 13 (#$ . 164019)]) (byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias python-info-closing-block-message python-info-dedenter-opening-block-message nil make-obsolete "24.4"] 4) #@67 Message the first line of the block the current statement closes. (defalias 'python-info-dedenter-opening-block-message #[0 "\300 \211\205\301\302\212b\210`\303 {)\"\207" [python-info-dedenter-opening-block-position message "Closes %s" line-end-position] 5 (#$ . 165501)]) #@119 Return point if current statement is a dedenter. Sets `match-data' to the keyword that starts the dedenter statement. (defalias 'python-info-dedenter-statement-p #[0 "\212\300 \210\301 ?\205\302\303!\205`)\207" [python-nav-beginning-of-statement python-syntax-context-type looking-at "\\_<\\(?:e\\(?:l\\(?:if\\|se\\)\\|xcept\\)\\|finally\\)\\_>"] 2 (#$ . 165784)]) #@142 Return non-nil if current line ends with backslash. With optional argument LINE-NUMBER, check that line instead. (fn &optional LINE-NUMBER) (defalias 'python-info-line-ends-backslash-p #[256 "\212\211\203 \300!\210m\204,\301 b\203,\302 A@\203,`\206`Sf\303=\204,\304y\210\202 `Sf\303=\2056\305 )\207" [python-util-goto-line line-end-position syntax-ppss 92 1 point-marker] 3 (#$ . 166160)]) #@152 Return the point where the backslashed line starts. Optional argument LINE-NUMBER forces the line number to check against. (fn &optional LINE-NUMBER) (defalias 'python-info-beginning-of-backslash #[256 "\212\211\203 \300!\210\301 \205&\212\302 b\210\303 A@)\203!\304y\210\202\305 \210\306 )\207" [python-util-goto-line python-info-line-ends-backslash-p line-beginning-position syntax-ppss -1 back-to-indentation point-marker] 3 (#$ . 166568)]) #@144 Check if current line is continuation of another. When current line is continuation of another return the point where the continued line ends. (defalias 'python-info-continuation-line-p #[0 "\212\300 \210\301 \302 \205\303!\304\267\202-\305\306!\210\307 \266\203\202E\211b\210\305 \210\310 \266\203\202E\300 \210\305\306!\210S\302 \232\205C\311 \205C\307 \266\203)\207" [back-to-indentation python-syntax-context-type line-number-at-pos python-syntax-context #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (paren 21 string 32 comment 32)) python-util-forward-comment -1 point-marker python-info-continuation-line-p python-info-line-ends-backslash-p] 5 (#$ . 167026)]) #@62 Return non-nil if current line is a continuation of a block. (defalias 'python-info-block-continuation-line-p #[0 "\212\300 \205\301y\210\302 \210\303\304!\205\305 )\207" [python-info-continuation-line-p -1 back-to-indentation looking-at "\\_<\\(?:def\\|class\\|if\\|elif\\|else\\|try\\|except\\|finally\\|for\\|while\\|with\\|async[[:space:]]+\\(?:def\\|for\\|with\\)\\)\\_>" point-marker] 2 (#$ . 167749)]) #@200 Check if current line is an assignment. With argument CURRENT-LINE-ONLY is non-nil, don't follow any continuations, just check the if current line is an assignment. (fn &optional CURRENT-LINE-ONLY) (defalias 'python-info-assignment-statement-p #[256 "\212\300\203\f\301 \210\202\302 \210\303\304\305 \306#\2031\211\2041\212\307\310!G\206%\310[u\210\311 ?\262)\202\211\205;\312\313!\210\314 \262)\207" [nil back-to-indentation python-nav-beginning-of-statement re-search-forward "[^%&*+/<->^|~-]\\(?:\\(?:\\*\\*\\|//\\|<<\\|>>\\|[%&*+/|^-]\\)?=\\)\\([^%&*+/<->^|~-]\\)" line-end-position t match-string-no-properties 1 python-syntax-context-type skip-syntax-forward " " point-marker] 6 (#$ . 168169)]) #@201 Check if current line is the first continuation of an assignment. When current line is continuation of another with an assignment return the point of the first non-blank character after the operator. (defalias 'python-info-assignment-continuation-line-p #[0 "\212\300 \205\f\301y\210\302\303!)\207" [python-info-continuation-line-p -1 python-info-assignment-statement-p t] 2 (#$ . 168890)]) #@90 Check if point is at `beginning-of-defun' using SYNTAX-PPSS. (fn &optional SYNTAX-PPSS) (defalias 'python-info-looking-at-beginning-of-defun #[256 "\301\206\302 !?\205\212\303\304!\210\305!)\207" [python-nav-beginning-of-defun-regexp python-syntax-context-type syntax-ppss beginning-of-line 1 looking-at] 3 (#$ . 169288)]) #@51 Return non-nil if current line is a comment line. (defalias 'python-info-current-line-comment-p #[0 "\300\301 \302 \\f\206 \303\304\"\207" [char-equal line-beginning-position current-indentation 95 35] 3 (#$ . 169624)]) #@63 Return non-nil if current line is empty, ignoring whitespace. (defalias 'python-info-current-line-empty-p #[0 "\212\300\301!\210\302\303!\210\304\301!\305\230)\207" [beginning-of-line 1 looking-at "^[[:space:]]*\\(.*\\)[[:space:]]*$" match-string-no-properties ""] 2 (#$ . 169851)]) #@168 Return non-nil if point is in a docstring. When optional argument SYNTAX-PPSS is given, use that instead of point's current `syntax-ppss'. (fn &optional SYNTAX-PPSS) (defalias 'python-info-docstring-p #[256 "\212\211\203\211\206 \301 \3028\205\3038\262\203\3038b\210\304 \210\305\306 \307\310 ?\205\222\311\312\313!)\262\205\222\314\307\314X\203o\212\315 \210`\262\306 U\205a\316\"?\262\205a\311\312\313!)\262)\203ob\210T\262\2029\262Y\205\222\317\320!\210\304 \210o\206\222\310 \203\214\266\312\202\224\321 \206\222\307\266\203)\207" [inhibit-changing-match-data syntax-ppss 3 8 python-nav-beginning-of-statement 1 current-indentation nil python-info-assignment-statement-p "[uU]?[rR]?\\(?:[^\"'\\]\\|\\=\\|\\(?:[^\\]\\|\\=\\)\\\\\\(?:\\\\\\\\\\)*[\"']\\)\\(?:\\\\\\\\\\)*\\(\\(?:\"\"\"\\|'''\\|[\"']\\)\\)" t looking-at 2 python-nav-backward-sexp eql python-util-forward-comment -1 python-info-looking-at-beginning-of-defun] 9 (#$ . 170141)]) #@92 Detect current buffer's encoding from its coding cookie. Returns the encoding as a symbol. (defalias 'python-info-encoding-from-cookie #[0 "\212\214~\210eb\210\300y\210\301`e\"*\302\303\"\205\304\305\306\"!\207" [2 buffer-substring-no-properties string-match "^#[[:space:]]*\\(?:coding[:=][[:space:]]*\\(?1:\\(?:[[:word:]]\\|-\\)+\\)\\|-\\*-[[:space:]]*coding:[[:space:]]*\\(?1:\\(?:[[:word:]]\\|-\\)+\\)[[:space:]]*-\\*-\\|vim:[[:space:]]*set[[:space:]]+fileencoding[[:space:]]*=[[:space:]]*\\(?1:\\(?:[[:word:]]\\|-\\)+\\)[[:space:]]*:\\)" intern match-string-no-properties 1] 5 (#$ . 171135)]) #@107 Return encoding for file. Try `python-info-encoding-from-cookie', if none is found then default to utf-8. (defalias 'python-info-encoding #[0 "\300 \206\301\207" [python-info-encoding-from-cookie utf-8] 1 (#$ . 171743)]) #@46 Move point to LINE-NUMBER. (fn LINE-NUMBER) (defalias 'python-util-goto-line #[257 "eb\210\211Sy\207" [] 2 (#$ . 171972)]) #@156 Clone local variables from FROM-BUFFER. Optional argument REGEXP selects variables to clone and defaults to "^python-". (fn FROM-BUFFER &optional REGEXP) (defalias 'python-util-clone-local-variables #[513 "\300\301\302\"\303!\"\207" [mapc make-closure #[257 "\211@9\205\301\300\206\f\302\303@!\"\205\304@!AL\207" [V0 string-match "^python-" symbol-name make-local-variable] 5 "\n\n(fn PAIR)"] buffer-local-variables] 6 (#$ . 172103)]) #@95 Return comint last prompt overlay start and end. This is for compatibility with Emacs < 24.4. (defalias 'python-util-comint-last-prompt #[0 "\302\300!\203\203\303!\304!B\207\302\301!\203 \203 \207\305\207" [comint-last-prompt-overlay comint-last-prompt boundp overlay-start overlay-end nil] 3 (#$ . 172555)]) #@140 Python mode specific version of `forward-comment'. Optional argument DIRECTION defines the direction to move to. (fn &optional DIRECTION) (defalias 'python-util-forward-comment #[256 "\301 \3028\205 \3038\262\206\304\304W\203\305\202\306\211\203%b\210\307!)\207" [comment-start syntax-ppss 4 8 0 -99999 99999 forward-comment] 6 (#$ . 172882)]) #@363 List DIRECTORY subdirs, filtered by PREDICATE and limited by MAX-DEPTH. Argument PREDICATE defaults to `identity' and must be a function that takes one argument (a full path) and returns non-nil for allowed files. When optional argument MAX-DEPTH is non-nil, stop searching when depth is reached, else don't limit. (fn DIRECTORY &optional PREDICATE MAX-DEPTH) (defalias 'python-util-list-directories #[769 "\300!\211G\206\n\301C\302\203E@!\203\211B\262\303A\304\305\"\302#\262\203A\306\302O\307\310#GX\203A\302\262\210\202 \211\237\207" [expand-file-name identity nil append python-util-list-files file-directory-p split-string "/\\|\\\\" t] 14 (#$ . 173250)]) #@218 List files in DIR, filtering with PREDICATE. Argument PREDICATE defaults to `identity' and must be a function that takes one argument (a full path) and returns non-nil for allowed files. (fn DIR &optional PREDICATE) (defalias 'python-util-list-files #[513 "\300!\301\302\303\304\305#\306!\"\"\207" [file-name-as-directory apply nconc mapcar make-closure #[257 "\302\301\"\303\235?\205\300\206\304!\205\211C\207" [V0 V1 expand-file-name ("." "..") identity] 4 "\n\n(fn FILE-NAME)"] directory-files] 10 (#$ . 173947)]) #@176 List packages in DIR, limited by MAX-DEPTH. When optional argument MAX-DEPTH is non-nil, stop searching when depth is reached, else don't limit. (fn DIR &optional MAX-DEPTH) (defalias 'python-util-list-packages #[513 "\300!\301\302\301\303!!!!\211G\304\305\306\"\307\302!\310#\"\207" [expand-file-name file-name-directory directory-file-name file-name-as-directory mapcar make-closure #[257 "\301\302\303\300\304O#\207" [V0 replace-regexp-in-string "[/\\]" "." nil] 7 "\n\n(fn FILE-NAME)"] python-util-list-directories #[257 "\300\301\302\"!\207" [file-exists-p expand-file-name "__init__.py"] 5 "\n\n(fn DIR)"]] 11 (#$ . 174487)]) #@171 Return LST first N elements. N should be an integer, when negative its opposite is used. When N is bigger than the length of LST, the list is returned as is. (fn LST N) (defalias 'python-util-popn #[514 "\300!\301_G\302V\203\207\303W\203'@B\262A\262S\262\202\304!\207" [abs 1 nil 0 reverse] 7 (#$ . 175136)]) #@75 Strip STRING whitespace and newlines from end and beginning. (fn STRING) (defalias 'python-util-strip-string #[257 "\300\301\302#\207" [replace-regexp-in-string "\\`[\n [:space:]]*\\|[\n [:space:]]*\\'" ""] 5 (#$ . 175471)]) #@49 Return non-nil if REGEXP is valid. (fn REGEXP) (defalias 'python-util-valid-regexp-p #[257 "\3001\f\301\302\"\210\3030\207\210\304\207" [(error) string-match "" t nil] 4 (#$ . 175704)]) (byte-code "\300\301\302\303\304\305\306\307\310\311& \210\312\313\314\315\316DD\317\310\311\304\301\320\321& \210\312\322\314\315\323DD\324\310\311\304\301\320\325& \210\312\326\314\315\327DD\330\310\311\304\301\320\331& \207" [custom-declare-group python-flymake nil "Integration between Python and Flymake." :group python :link (custom-group-link :tag "Flymake" flymake) :version "26.1" custom-declare-variable python-flymake-command funcall function #[0 "\300\207" [("pyflakes")] 1] "The external tool that will be used to perform the syntax check.\nThis is a non empty list of strings, the checker tool possibly followed by\nrequired arguments. Once launched it will receive the Python source to be\nchecked as its standard input.\nTo use `flake8' you would set this to (\"flake8\" \"-\")." :type (repeat string) python-flymake-command-output-pattern #[0 "\300\301\302\303\304\257\207" ["^\\(?:?\\):\\(?1:[0-9]+\\):\\(?:\\(?2:[0-9]+\\):\\)? \\(?3:.*\\)$" 1 2 nil 3] 5] "Specify how to parse the output of `python-flymake-command'.\nThe value has the form (REGEXP LINE COLUMN TYPE MESSAGE): if\nREGEXP matches, the LINE'th subexpression gives the line number,\nthe COLUMN'th subexpression gives the column number on that line,\nthe TYPE'th subexpression gives the type of the message and the\nMESSAGE'th gives the message text itself.\n\nIf COLUMN or TYPE are nil or that index didn't match, that\ninformation is not present on the matched line and a default will\nbe used." (list regexp (integer :tag "Line's index") (choice (const :tag "No column" nil) (integer :tag "Column's index")) (choice (const :tag "No type" nil) (integer :tag "Type's index")) (integer :tag "Message's index")) python-flymake-msg-alist #[0 "\300\207" [(("\\(^redefinition\\|.*unused.*\\|used$\\)" . :warning))] 1] "Alist used to associate messages to their types.\nEach element should be a cons-cell (REGEXP . TYPE), where TYPE\nshould be a diagnostic type symbol like `:error', `:warning' or\n`:note'. For example, when using `flake8' a possible\nconfiguration could be:\n\n ((\"\\(^redefinition\\|.*unused.*\\|used$\\)\" . :warning)\n (\"^E999\" . :error)\n (\"^[EW][0-9]+\" . :note))\n\nBy default messages are considered errors." (alist :key-type (regexp) :value-type (symbol))] 10) (defvar python--flymake-proc nil nil) (make-variable-buffer-local 'python--flymake-proc) #@93 Collect diagnostics parsing checker tool's output line by line. (fn SOURCE PROC REPORT-FN) (defalias 'python--flymake-parse-output #[771 "@A@\3028\3038\3048r\305!q\210eb\210\306\211\211\211\211\211\307 \306\310#\203\215\311!\262\312\313\311 !! \205H\311\f!\205H\313\311 !!#\262\211A\262\242\262\203j\311!\203j\314\311 ! \315#\206t\314 \315#\206t\316\262\317 %C\244\262\306\262\202 !\266)\306\207" [python-flymake-command-output-pattern python-flymake-msg-alist 2 3 4 process-buffer nil search-forward-regexp t match-string flymake-diag-region string-to-number assoc-default string-match :error flymake-make-diagnostic] 21 (#$ . 178272)]) #@228 Flymake backend for Python. This backend uses `python-flymake-command' (which see) to launch a process that is passed the current buffer's content via stdin. REPORT-FN is Flymake's callback function. (fn REPORT-FN &rest ARGS) (defalias 'python-flymake #[385 "\302@!\204 \303\304!\210\305 !\203\306 !\210p\214~\210\307\310\311\312\313\314\315\316\317\320!\321\322\323\324#&\f\325 ed#\210\326 !)\207" [python-flymake-command python--flymake-proc executable-find error "Cannot find a suitable checker" process-live-p kill-process make-process :name "python-flymake" :noquery t :connection-type pipe :buffer generate-new-buffer " *python-flymake*" :command :sentinel make-closure #[514 "\303!\304=\205\305\306\"\216r\301q\210\n)=\205\307\301\300#)\207" [V0 V1 python--flymake-proc process-status exit make-closure #[0 "\301\302\300!!\207" [V0 kill-buffer process-buffer] 3] python--flymake-parse-output] 6 "\n\n(fn PROC EVENT)"] process-send-region process-send-eof] 19 (#$ . 178971)]) (defalias 'python-electric-pair-string-delimiter #[0 "\2056 \302>\2056\303`Z\206`Sf =\203 \211T\262\202 \211\304U\262\2056\305f =\2056\212\306\307 \"c)\207" [electric-pair-mode last-command-event (34 39) 0 3 nil make-string 2] 3]) (defvar python-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [python-mode-hook variable-documentation put "Hook run after entering Python mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp python-mode-map definition-name python-mode] 4) (defvar python-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [python-mode-abbrev-table python-mode-map variable-documentation put purecopy "Keymap for `python-mode'." boundp python-mode-syntax-table definition-name python-mode (lambda (#1=#:def-tmp-var) (defvar python-mode-syntax-table #1#)) make-syntax-table "Syntax table for `python-mode'." (lambda (#1#) (defvar python-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `python-mode'." derived-mode-parent prog-mode] 5) #@228 Major mode for editing Python files. \{python-mode-map} In addition to any hooks its parent mode `prog-mode' might have run, this mode runs the hook `python-mode-hook', as the final or penultimate step during initialization. (defalias 'python-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2035\211\321 =\203;\322\f\323 \"\210\210\324 \325\"\204R @=\204R\326 \325@C#\210\327 !\210\330\f!\210 @\306\331!\210\332\306\333!\210\334\306\335!\210\336\306\337!\210\340\306\341!\210\307!\306\342!\210\307\"\306\343!\210\344#\306\345!\210A\346B%\306\347!\210B'\306\350!\210\351(\306\352!\210\353*\306\354!\210\307,\306\355!\210\356-B-\357\360\361\362\307$\210\306\363!\210\3643\306\365!\210\3665\306\367!\210\3707\306\371!\210\3729\306\373!\210\374;\357\375\376\334\377$\210\357\360\201M\362\377$\210\306\201C!\210\201NC\306\201D!\210\201OD\357\201P\201O\334\307$\210\306\201E!\210\201QEF\2048\306\201F!\210\201RF\202c\201S\201T!\203P\357\201T\201R\334\307$\210\202c\201U\201V\201W\201XB\201R\334$\210\201Y\201Z\201[\"\210\306\201G!\210\201\\G\306\201H!\210\201]H\306\201I!\210\201^I\306\201K!\210JK\201_ \210\306\201`!\210L\203\256\201L \210\357\201a\201b\334\307$\210)\201c\201d!\207" [delay-mode-hooks major-mode mode-name python-mode-map python-mode-syntax-table python-mode-abbrev-table make-local-variable t prog-mode python-mode "Python" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table tab-width 8 indent-tabs-mode nil comment-start "# " comment-start-skip "#+\\s-*" parse-sexp-lookup-properties parse-sexp-ignore-comments forward-sexp-function python-nav-forward-sexp font-lock-defaults (nil nil nil nil (font-lock-syntactic-face-function . python-font-lock-syntactic-face-function)) syntax-propertize-function indent-line-function python-indent-line-function indent-region-function python-indent-region electric-indent-inhibit electric-indent-chars 58 add-hook post-self-insert-hook python-electric-pair-string-delimiter append paragraph-start "\\s-*$" fill-paragraph-function python-fill-paragraph normal-auto-fill-function python-do-auto-fill beginning-of-defun-function python-nav-beginning-of-defun end-of-defun-function python-nav-end-of-defun completion-at-point-functions python-completion-at-point local local-abbrev-table python-font-lock-keywords python-syntax-propertize-function imenu-create-index-function add-log-current-defun-function skeleton-further-elements eldoc-documentation-function outline-regexp outline-heading-end-regexp outline-level python-prettify-symbols-alist prettify-symbols-alist python-indent-guess-indent-offset python-indent-post-self-insert-function python-imenu-create-index python-info-current-defun which-func-functions ((abbrev-mode nil) (< '(backward-delete-char-untabify (min python-indent-offset (current-column)))) (^ '(- (1+ (current-indentation))))) python-eldoc-function boundp eldoc-documentation-functions advice--add-function :before-until #[0 "\300\301!\207" [advice--buffer-local eldoc-documentation-function] 2] #[257 "\300\301\"\207" [advice--set-buffer-local eldoc-documentation-function] 4 "\n\n(fn GV--VAL)"] add-to-list hs-special-modes-alist (python-mode "\\s-*\\_<\\(?:def\\|class\\)\\_>" "" "#" python-hideshow-forward-sexp-function nil) "[[:space:]]*\\_<\\(?:def\\|class\\|if\\|elif\\|else\\|try\\|except\\|finally\\|for\\|while\\|with\\|async[[:space:]]+\\(?:def\\|for\\|with\\)\\)\\_>" ":[^\n]*\n" #[0 "\301 \245T\207" [python-indent-offset current-indentation] 2 "`outline-level' function for Python mode."] python-skeleton-add-menu-items python-shell-internal-buffer flymake-diagnostic-functions python-flymake run-mode-hooks python-mode-hook] 5 (#$ . 181360) nil]) (provide 'python)