;ELC   
;;; Compiled by nelson@oikos.local on Thu May 13 16:37:49 2004
;;; from file /Users/nelson/.elisp/python-mode.el
;;; in Emacs version 21.3.50.1
;;; with bytecomp version 2.139
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`python-mode.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@31 `python-mode' version number.
(defconst py-version "$Revision: 4.54 $" (#$ . 608))
(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\312\313\314&\207" [require comint custom cl compile custom-declare-group python nil "Support for the Python programming language, <http://www.python.org/>" :group languages :prefix "py-"] 8)
#@50 *Shell command used to start Python interpreter.
(custom-declare-variable 'py-python-command '"python" '(#$ . -974) :type 'string :group 'python)
#@55 *Shell command used to start the JPython interpreter.
(custom-declare-variable 'py-jpython-command '"jpython" '(#$ . -1126) :type 'string :group 'python :tag "JPython Command")
#@621 *Which Python interpreter is used by default.
The value for this variable can be either `cpython' or `jpython'.

When the value is `cpython', the variables `py-python-command' and
`py-python-command-args' are consulted to determine the interpreter
and arguments to use.

When the value is `jpython', the variables `py-jpython-command' and
`py-jpython-command-args' are consulted to determine the interpreter
and arguments to use.

Note that this variable is consulted only the first time that a Python
mode buffer is visited during an Emacs session.  After that, use
\[py-toggle-shells] to change the interpreter shell.
(custom-declare-variable 'py-default-interpreter ''cpython '(#$ . -1310) :type '(choice (const :tag "Python (a.k.a. CPython)" cpython) (const :tag "JPython" jpython)) :group 'python)
#@68 *List of string arguments to be used when starting a Python shell.
(custom-declare-variable 'py-python-command-args ''("-i") '(#$ . -2119) :type '(repeat string) :group 'python)
#@69 *List of string arguments to be used when starting a JPython shell.
(custom-declare-variable 'py-jpython-command-args ''("-i") '(#$ . -2303) :type '(repeat string) :group 'python :tag "JPython Command Args")
#@152 *Amount of offset per level of indentation.
`\[py-guess-indent-offset]' can usually guess a good value when
you're editing someone else's Python code.
(custom-declare-variable 'py-indent-offset '4 '(#$ . -2518) :type 'integer :group 'python)
#@239 *Additional amount of offset to give for some continuation lines.
Continuation lines are those that immediately follow a backslash
terminated line.  Only those continuation lines for a block opening
statement are given this extra offset.
(custom-declare-variable 'py-continuation-offset '4 '(#$ . -2767) :type 'integer :group 'python)
#@958 *Should `python-mode' try to automagically set some indentation variables?
When this variable is non-nil, two things happen when a buffer is set
to `python-mode':

    1. `py-indent-offset' is guessed from existing code in the buffer.
       Only guessed values between 2 and 8 are considered.  If a valid
       guess can't be made (perhaps because you are visiting a new
       file), then the value in `py-indent-offset' is used.

    2. `indent-tabs-mode' is turned off if `py-indent-offset' does not
       equal `tab-width' (`indent-tabs-mode' is never turned on by
       Python mode).  This means that for newly written code, tabs are
       only inserted in indentation if one tab is one indentation
       level, otherwise only spaces are used.

Note that both these settings occur *after* `python-mode-hook' is run,
so if you want to defeat the automagic configuration, you must also
set `py-smart-indentation' to nil in your `python-mode-hook'.
(custom-declare-variable 'py-smart-indentation 't '(#$ . -3109) :type 'boolean :group 'python)
#@238 *Flag describing how multi-line triple quoted strings are aligned.
When this flag is non-nil, continuation lines are lined up under the
preceding line's indentation.  When this flag is nil, continuation
lines are aligned to column zero.
(custom-declare-variable 'py-align-multiline-strings-p 't '(#$ . -4168) :type '(choice (const :tag "Align under preceding line" t) (const :tag "Align to column zero" nil)) :group 'python)
#@345 *String used by \[comment-region] to comment out a block of code.
This should follow the convention for non-indenting comment lines so
that the indentation commands won't get confused (i.e., the string
should be of the form `#x...' where `x' is not a blank or a tab, and
`...' is arbitrary).  However, this string should not end in whitespace.
(custom-declare-variable 'py-block-comment-prefix '"##" '(#$ . -4600) :type 'string :group 'python)
#@697 *Controls how comment lines influence subsequent indentation.

When nil, all comment lines are skipped for indentation purposes, and
if possible, a faster algorithm is used (i.e. X/Emacs 19 and beyond).

When t, lines that begin with a single `#' are a hint to subsequent
line indentation.  If the previous line is such a comment line (as
opposed to one that starts with `py-block-comment-prefix'), then its
indentation is used as a hint for this line's indentation.  Lines that
begin with `py-block-comment-prefix' are ignored for indentation
purposes.

When not nil or t, comment lines that begin with a single `#' are used
as indentation hints, unless the comment character is in column zero.
(custom-declare-variable 'py-honor-comment-indentation 't '(#$ . -5051) :type '(choice (const :tag "Skip all comment lines (fast)" nil) (const :tag "Single # `sets' indentation for next line" t) (const :tag "Single # `sets' indentation except at column zero" other)) :group 'python)
#@263 *Directory used for temporary files created by a *Python* process.
By default, the first directory from this list that exists and that you
can write into: the value (if any) of the environment variable TMPDIR,
/usr/tmp, /tmp, /var/tmp, or the current directory.
(custom-declare-variable 'py-temp-directory '(let ((ok '(lambda (x) (and x (setq x (expand-file-name x)) (file-directory-p x) (file-writable-p x) x)))) (or (funcall ok (getenv "TMPDIR")) (funcall ok "/usr/tmp") (funcall ok "/tmp") (funcall ok "/var/tmp") (funcall ok ".") (error "Couldn't find a usable temp directory -- set `py-temp-directory'"))) '(#$ . -6037) :type 'string :group 'python)
#@420 *Ring the bell if `tab-width' is changed.
If a comment of the form

  	# vi:set tabsize=<number>:

is found before the first code line when the file is entered, and the
current value of (the general Emacs variable) `tab-width' does not
equal <number>, `tab-width' is set to <number>, a message saying so is
displayed in the echo area, and if `py-beep-if-tab-change' is non-nil
the Emacs bell is also rung as a warning.
(custom-declare-variable 'py-beep-if-tab-change 't '(#$ . -6699) :type 'boolean :group 'python)
#@243 *Jump to innermost exception frame in *Python Output* buffer.
When this variable is non-nil and an exception occurs when running
Python code synchronously in a subprocess, jump immediately to the
source code of the innermost traceback frame.
(custom-declare-variable 'py-jump-on-exception 't '(#$ . -7221) :type 'boolean :group 'python)
#@131 If not nil, ask about which buffers to save before executing some code.
Otherwise, all modified buffers are saved without asking.
(custom-declare-variable 'py-ask-about-save 't '(#$ . 7565) :type 'boolean :group 'python)
#@70 *Function called by `py-electric-backspace' when deleting backwards.
(custom-declare-variable 'py-backspace-function ''backward-delete-char-untabify '(#$ . -7792) :type 'function :group 'python)
#@66 *Function called by `py-electric-delete' when deleting forwards.
(custom-declare-variable 'py-delete-function ''delete-char '(#$ . -7993) :type 'function :group 'python)
#@113 *Controls echoing of arguments of functions & methods in the Imenu buffer.
When non-nil, arguments are printed.
(custom-declare-variable 'py-imenu-show-method-args-p 'nil '(#$ . -8170) :type 'boolean :group 'python)
(make-variable-buffer-local 'py-indent-offset)
#@381 *Controls whether the pdbtrack feature is enabled or not.
When non-nil, pdbtrack is enabled in all comint-based buffers,
e.g. shell buffers and the *Python* buffer.  When using pdb to debug a
Python program, pdbtrack notices the pdb prompt and displays the
source file and line that the program is stopped at, much the same way
as gud-mode does for debugging C programs with gdb.
(custom-declare-variable 'py-pdbtrack-do-tracking-p 't '(#$ . -8440) :type 'boolean :group 'python)
(make-variable-buffer-local 'py-pdbtrack-do-tracking-p)
#@65 *String to use in the minor mode list when pdbtrack is enabled.
(custom-declare-variable 'py-pdbtrack-minor-mode-string '" PDB" '(#$ . -8982) :type 'string :group 'python)
#@327 Maximum number of characters to search for a Java-ish import statement.
When `python-mode' tries to calculate the shell to use (either a
CPython or a JPython shell), it looks at the so-called `shebang' line
-- i.e. #! line.  If that's not available, it looks at some of the
file heading imports to see if they look Java-like.
(custom-declare-variable 'py-import-check-point-max '20000 '(#$ . 9161) :type 'integer :group 'python)
#@46 Imported packages that imply `jpython-mode'.
(custom-declare-variable 'py-jpython-packages ''("java" "javax" "org" "com") '(#$ . 9596) :type '(repeat string) :group 'python)
#@478 If non-nil, execute the named file instead of the buffer's file.
The intent is to allow you to set this variable in the file's local
variable section, e.g.:

    # Local Variables:
    # py-master-file: "master.py"
    # End:

so that typing \[py-execute-buffer] in that buffer executes the named
master file instead of the buffer's file.  If the file name has a
relative path, the value of variable `default-directory' for the
buffer is prepended to come up with a file name.
(defvar py-master-file nil (#$ . 9777))
(make-variable-buffer-local 'py-master-file)
#@39 *Shell command used to run Pychecker.
(custom-declare-variable 'py-pychecker-command '"pychecker" '(#$ . -10345) :type 'string :group 'python :tag "Pychecker Command")
#@54 *List of string arguments to be passed to pychecker.
(custom-declare-variable 'py-pychecker-command-args ''("--stdlib") '(#$ . -10519) :type '(repeat string) :group 'python :tag "Pychecker Command Args")
#@131 *Alist of interpreters and python shells. Used by `py-choose-shell'
to select the appropriate python interpreter mode for a file.
(defvar py-shell-alist '(("jpython" quote jpython) ("jython" quote jpython) ("python" quote cpython)) (#$ . -10730))
#@169 A list of features extant in the Emacs you are using.
There are many flavors of Emacs out there, with different levels of
support for features needed by `python-mode'.
(defconst py-emacs-features nil (#$ . 10984))
#@76 Face for pseudo keywords in Python mode, like self, True, False, Ellipsis.
(defvar py-pseudo-keyword-face 'py-pseudo-keyword-face (#$ . 11204))
(make-face 'py-pseudo-keyword-face)
#@25 Face method decorators.
(defvar py-decorators-face 'py-decorators-face (#$ . 11390))
(make-face 'py-decorators-face)
#@59 Face for builtins like TypeError, object, open, and exec.
(defvar py-builtins-face 'py-builtins-face (#$ . 11513))
(make-face 'py-builtins-face)
(defalias 'py-font-lock-mode-hook #[nil "\300\301!\204 \302\303\301\"\210\300\304!\204 \302\303\304\"\210\300\305!\206  \302\301\305\"\207" [face-differs-from-default-p py-pseudo-keyword-face copy-face font-lock-keyword-face py-builtins-face py-decorators-face] 3])
(add-hook 'font-lock-mode-hook 'py-font-lock-mode-hook)
#@53 Additional expressions to highlight in Python mode.
(defvar python-font-lock-keywords (byte-code "\303\304\305\306#\303\304\307\306#\303\304\310\306#\311\312\n\313Q\314B\315\313Q\316\317E\312	\320Q\314B\321\322\323\324\257+\207" [kw3 kw2 kw1 mapconcat identity ("and" "assert" "break" "class" "continue" "def" "del" "elif" "else" "except" "exec" "for" "from" "global" "if" "import" "in" "is" "lambda" "not" "or" "pass" "print" "raise" "return" "while" "yield") "\\|" ("else:" "except:" "finally:" "try:") ("ArithmeticError" "AssertionError" "AttributeError" "DeprecationWarning" "EOFError" "EnvironmentError" "Exception" "FloatingPointError" "FutureWarning" "IOError" "ImportError" "IndentationError" "IndexError" "KeyError" "KeyboardInterrupt" "LookupError" "MemoryError" "NameError" "NotImplemented" "NotImplementedError" "OSError" "OverflowError" "OverflowWarning" "PendingDeprecationWarning" "ReferenceError" "RuntimeError" "RuntimeWarning" "StandardError" "StopIteration" "SyntaxError" "SyntaxWarning" "SystemError" "SystemExit" "TabError" "TypeError" "UnboundLocalError" "UnicodeDecodeError" "UnicodeEncodeError" "UnicodeError" "UnicodeTranslateError" "UserWarning" "ValueError" "Warning" "ZeroDivisionError" "__debug__" "__import__" "__name__" "abs" "apply" "basestring" "bool" "buffer" "callable" "chr" "classmethod" "cmp" "coerce" "compile" "complex" "copyright" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "execfile" "exit" "file" "filter" "float" "getattr" "globals" "hasattr" "hash" "hex" "id" "input" "int" "intern" "isinstance" "issubclass" "iter" "len" "license" "list" "locals" "long" "map" "max" "min" "object" "oct" "open" "ord" "pow" "property" "range" "raw_input" "reduce" "reload" "repr" "round" "setattr" "slice" "staticmethod" "str" "sum" "super" "tuple" "type" "unichr" "unicode" "vars" "xrange" "zip") ("\\bdef[ 	]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)[ 	]*(.*)[ 	]*\\(\\[[^]]*\\]\\)" (1 font-lock-function-name-face) (2 py-decorators-face)) "\\b\\(" "\\)\\b[ \n	(]" 1 "\\([^. 	]\\|^\\)[ 	]*\\b\\(" 2 py-builtins-face "\\)[ \n	(]" ("[ 	]*\\(\\bfrom\\b.*\\)?\\bimport\\b.*\\b\\(as\\)\\b" . 2) ("\\bclass[ 	]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)" 1 font-lock-type-face) ("\\bdef[ 	]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)" 1 font-lock-function-name-face) ("\\b\\(self\\|None\\|True\\|False\\|Ellipsis\\)\\b" 1 py-pseudo-keyword-face)] 8) (#$ . 11988))
(put 'python-mode 'font-lock-defaults '(python-font-lock-keywords))
#@98 Queue of Python temp files awaiting execution.
Currently-active file is at the head of the list.
(defvar py-file-queue nil (#$ . 14425))
(byte-code "\301B\302\301!\204 \303\301\304\"\210\304\207" [current-load-list py-pdbtrack-is-tracking-p default-boundp set-default nil] 3)
#@239 Record of the last buffer used when the source path was invalid.

This buffer is consulted before the buffer-list history for satisfying
`py-pdbtrack-grub-for-buffer', since it's the most often the likely
prospect as debugging continues.
(defvar py-pdbtrack-last-grubbed-buffer nil (#$ . 14711))
(byte-code "\301\302!\210\303B\304\303!\204 \305\303\306\"\210\306\207" [current-load-list make-variable-buffer-local py-pdbtrack-last-grubbed-buffer py-pychecker-history default-boundp set-default nil] 3)
#@54 Regular expression matching a Python string literal.
(defconst py-stringlit-re "[rR]?'''[^']*\\(\\('[^']\\|''[^']\\)[^']*\\)*'''\\|[rR]?\"\"\"[^\"]*\\(\\(\"[^\"]\\|\"\"[^\"]\\)[^\"]*\\)*\"\"\"\\|[rR]?'\\([^'\n\\]\\|\\\\.\\)*'\\|[rR]?\"\\([^\"\n\\]\\|\\\\.\\)*\"" (#$ . 15222))
#@66 Regular expression matching Python backslash continuation lines.
(defconst py-continued-re (concat "\\(" "[^#'\"\n\\]" "\\|" py-stringlit-re "\\)*" "\\\\$") (#$ . 15505))
#@54 Regular expression matching a blank or comment line.
(defconst py-blank-or-comment-re "[ 	]*\\($\\|#\\)" (#$ . 15682))
#@66 Regular expression matching statements to be dedented one level.
(defconst py-outdent-re (byte-code "\300\301\302\303\304#\305Q\207" ["\\(" mapconcat identity ("else:" "except\\(\\s +.*\\)?:" "finally:" "elif\\s +.*:") "\\|" "\\)"] 5) (#$ . 15807))
#@69 Regular expression matching keywords which typically close a block.
(defconst py-block-closing-keywords-re "\\(return\\|raise\\|break\\|continue\\|pass\\)" (#$ . 16062))
#@56 Regular expression matching lines not to dedent after.
(defconst py-no-outdent-re (byte-code "\301\302\303\304\305\306\307\310\311\312P\257\313#\314Q\207" [py-block-closing-keywords-re "\\(" mapconcat identity "try:" "except\\(\\s +.*\\)?:" "while\\s +.*:" "for\\s +.*:" "if\\s +.*:" "elif\\s +.*:" "[ 	\n]" "\\|" "\\)"] 11) (#$ . 16238))
#@47 Regular expression that describes tracebacks.
(defconst py-traceback-line-re "[ 	]+File \"\\([^\"]+\\)\", line \\([0-9]+\\)" (#$ . 16585))
#@63 Regular expression pdbtrack uses to find a stack trace entry.
(defconst py-pdbtrack-stack-entry-regexp "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_]+\\)()" (#$ . 16730))
#@61 Regular expression pdbtrack uses to recognize a pdb prompt.
(defconst py-pdbtrack-input-prompt "\n[(<]*pdb[>)]+ " (#$ . 16903))
#@72 Max number of characters from end of buffer to search for stack entry.
(defconst py-pdbtrack-track-range 10000 (#$ . 17037))
#@47 Abbrev table in use in `python-mode' buffers.
(defvar python-mode-abbrev-table nil (#$ . 17168))
(define-abbrev-table 'python-mode-abbrev-table nil)
#@32 *Hook called by `python-mode'.
(defvar python-mode-hook nil (#$ . -17323))
#@79 *Hook called by `jpython-mode'. `jpython-mode' also calls
`python-mode-hook'.
(defvar jpython-mode-hook nil (#$ . -17404))
#@29 *Hook called by `py-shell'.
(defvar py-shell-hook nil (#$ . -17533))
(byte-code "\300\301!\203 \301\302\303\"\210\300\207" [fboundp make-obsolete-variable py-mode-hook python-mode-hook] 3)
#@39 Keymap used in `python-mode' buffers.
(defvar py-mode-map nil (#$ . 17729))
(byte-code "\204\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\306#\210\302\312\310#\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\331\332!\204^ \302\333\334#\210\202j \302\335\336#\210\302\337\334#\210\302\340\341#\210\302\342\343#\210\302\344\345#\210\302\346\347#\210\302\350\351#\210\302\352\353#\210\302\354\355#\210\302\356\357#\210\302\360\361#\210\302\362\363#\210\302\364\365#\210\302\366\367#\210\302\370\371#\210\302\372\373#\210\302\374\375#\210\302\376\377#\210\302\201@ \201A #\210\302\201B \201C #\210\302\201D \201E #\210\201F \201G \201H \201I !\"\210\302\201J \201K #\210\301\207" [py-mode-map make-sparse-keymap define-key ":" py-electric-colon "\f" py-shift-region-left "" py-shift-region-right "<" ">" "" py-execute-buffer "" py-execute-import-or-reload "" py-execute-string "|" py-execute-region "" py-execute-def-or-class "!" py-shell "" py-toggle-shells boundp delete-key-deletes-forward "" py-electric-backspace [delete] py-electric-delete [backspace] [(control meta h)] py-mark-def-or-class "" py-mark-block ":" py-guess-indent-offset "	" py-indent-region "" py-pdbtrack-toggle-stack-tracking "" py-next-statement "" py-previous-statement "" py-goto-block-up "#" py-comment-region "?" py-describe-mode "" py-help-at-point "" py-beginning-of-def-or-class "" py-end-of-def-or-class "-" py-up-exception "=" py-down-exception "nd" py-narrow-to-defun "" py-submit-bug-report "" py-version "" py-pychecker-run mapcar #[(key) "\302	\303#\207" [py-mode-map key define-key py-newline-and-indent] 4] where-is-internal newline-and-indent "" py-newline-and-indent] 4)
#@41 Keymap used in *Python Output* buffers.
(defvar py-mode-output-map nil (#$ . 19576))
(byte-code "\204 \301 \302\303\304#\210\302\305\306#\210\307\310\311\312!\"\210\301\207" [py-mode-output-map make-sparse-keymap define-key [button2] py-mouseto-exception "" py-goto-exception mapcar #[(key) "\302	\303#\207" [py-mode-output-map key define-key #[nil "\300 \207" [beep] 1 nil nil]] 4] where-is-internal self-insert-command] 4)
#@40 Keymap used in *Python* shell buffers.
(defvar py-shell-map nil (#$ . 20015))
(byte-code "\204 \302	!\303\304\305#\210\303\306\307#\210\303\310\311#\210\302\207" [py-shell-map comint-mode-map copy-keymap define-key [tab] tab-to-tab-stop "-" py-up-exception "=" py-down-exception] 4)
#@45 Syntax table used in `python-mode' buffers.
(defvar py-mode-syntax-table nil (#$ . 20312))
(byte-code "\204\221 \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\320#\210\302\322\320#\210\302\323\320#\210\302\324\320#\210\302\325\320#\210\302\326\320#\210\302\327\320#\210\302\330\320#\210\302\331\320#\210\302\332\320#\210\302\333\334#\210\302\335\336#\210\302\337\336#\210\302\340\341#\210\302\342\343#\210\302\344\345#\210\301\207" [py-mode-syntax-table make-syntax-table modify-syntax-entry 40 "()" 41 ")(" 91 "(]" 93 ")[" 123 "(}" 125 "){" 36 "." 37 38 42 43 45 47 60 61 62 124 95 "w" 39 "\"" 34 96 "$" 35 "<" 10 ">"] 4)
#@58 Syntax table used to identify Python dotted expressions.
(defvar py-dotted-expression-syntax-table nil (#$ . 21052))
(byte-code "\204 \302	!\303\304\305#\210\303\306\305#\210\302\207" [py-dotted-expression-syntax-table py-mode-syntax-table copy-syntax-table modify-syntax-entry 95 "_" 46] 4)
#@55 Safely execute BODY, return nil if an error occurred.
(defalias 'py-safe '(macro . #[(&rest body) "\301\302\303B\304BBB\207" [body condition-case nil progn ((error nil))] 4 (#$ . 21355)]))
#@35 Keep the region active in XEmacs.
(defalias 'py-keep-region-active #[nil "\301\300!\205	 \302\211\207" [zmacs-region-stays boundp t] 2 (#$ . 21551)])
(put 'py-keep-region-active 'byte-optimizer 'byte-compile-inline-expand)
#@396 Returns the value of point at certain commonly referenced POSITIONs.
POSITION can be one of the following symbols:

  bol  -- beginning of line
  eol  -- end of line
  bod  -- beginning of def or class
  eod  -- end of def or class
  bob  -- beginning of buffer
  eob  -- end of buffer
  boi  -- back to indentation
  bos  -- beginning of statement

This function does not modify point or mark.
(defalias 'py-point #[(position) "`	\302=\203 \303 \210\202i 	\304=\203 \305\210\202i 	\306=\203' \307\310!\210\202i 	\311=\2034 \312\310!\210\202i 	\313=\203@ \314 \210\202i 	\315=\203L \316 \210\202i 	\317=\203X \320 \210\202i 	\321=\203d \322 \210\202i \323\324	\"\210`b\210)\207" [here position bol beginning-of-line eol nil bod py-beginning-of-def-or-class either eod py-end-of-def-or-class bob beginning-of-buffer eob end-of-buffer boi back-to-indentation bos py-goto-initial-line error "Unknown buffer position requested: %s"] 3 (#$ . 21782)])
(put 'py-point 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'py-highlight-line #[(from to file line) "\306\307!\203  \307	\"\310\n\311\312#\210\310\n\313\fB#\210\310\n\314#)\207\315\207" [from to e file line py-mode-output-map fboundp make-extent set-extent-property mouse-face highlight py-exc-info keymap t] 5])
(put 'py-highlight-line 'byte-optimizer 'byte-compile-inline-expand)
#@181 Return non-nil if point is in a Python literal (a comment or string).
Optional argument LIM indicates the beginning of the containing form,
i.e. the limit on how far back to scan.
(defalias 'py-in-literal #[(&optional lim) "\206t \304`	\305=\203 \306 \210\202o 	\307=\203  \310\210\202o 	\304=\203- \311\312!\210\202o 	\313=\203: \314\312!\210\202o 	\315=\203F \316 \210\202o 	\317=\203R \320 \210\202o 	\321=\203^ \322 \210\202o 	\323=\203j \324 \210\202o \325\326	\"\210`\nb\210*\327`\"\3308\203\204 \331\202\217 \3328\203\216 \333\202\217 \310*\207" [lim position here state bod bol beginning-of-line eol nil py-beginning-of-def-or-class either eod py-end-of-def-or-class bob beginning-of-buffer eob end-of-buffer boi back-to-indentation bos py-goto-initial-line error "Unknown buffer position requested: %s" parse-partial-sexp 3 string 4 comment] 3 (#$ . 23137)])
#@80 Fast version of `py-in-literal', used only by XEmacs.
Optional LIM is ignored.
(defalias 'py-fast-in-literal #[(&optional lim) "\300 \207" [buffer-syntactic-context] 1 (#$ . 24021)])
(byte-code "\300\301!\203 \302\303\304\"\210\300\207" [fboundp buffer-syntactic-context defalias py-in-literal py-fast-in-literal] 3)
#@161 Menu for Python Mode.
This menu will get created automatically if you have the `easymenu'
package.  Note that the latest X/Emacs releases contain this package.
(defvar py-menu nil (#$ . 24346))
(byte-code "\302\303\304\217\203# \305B\306\305\307\310#\210\311\305!\204 \312\305\302\"\210\313\305	\310\314$\210\302\207" [current-load-list py-mode-map nil (byte-code "\300\301!\210\302\207" [require easymenu t] 2) ((error)) py-menu put variable-documentation "Python Mode menu" default-boundp set-default easy-menu-do-define ("Python" ["Comment Out Region" py-comment-region (mark)] ["Uncomment Region" (py-comment-region (point) (mark) '(4)) (mark)] "-" ["Mark current block" py-mark-block t] ["Mark current def" py-mark-def-or-class t] ["Mark current class" (py-mark-def-or-class t) t] "-" ["Shift region left" py-shift-region-left (mark)] ["Shift region right" py-shift-region-right (mark)] "-" ["Import/reload file" py-execute-import-or-reload t] ["Execute buffer" py-execute-buffer t] ["Execute region" py-execute-region (mark)] ["Execute def or class" py-execute-def-or-class (mark)] ["Execute string" py-execute-string t] ["Start interpreter..." py-shell t] "-" ["Go to start of block" py-goto-block-up t] ["Go to start of class" (py-beginning-of-def-or-class t) t] ["Move to end of class" (py-end-of-def-or-class t) t] ["Move to start of def" py-beginning-of-def-or-class t] ["Move to end of def" py-end-of-def-or-class t] "-" ["Describe mode" py-describe-mode t])] 5)
#@59 Regexp for Python classes for use with the Imenu package.
(defvar py-imenu-class-regexp "\\(^[ 	]*\\(class[ 	]+[a-zA-Z0-9_]+\\)\\([ 	]*\\((\\([a-zA-Z0-9_,. 	\n]\\)*)\\)?\\)[ 	]*:\\)" (#$ . 25830))
#@69 Regexp for Python methods/functions for use with the Imenu package.
(defvar py-imenu-method-regexp "\\(^[ 	]*\\(def[ 	]+\\([a-zA-Z0-9_]+\\)[ 	]*(\\([^:#]*\\))\\)[ 	]*:\\)" (#$ . 26033))
#@230 Indices into groups of the Python regexp for use with Imenu.

Using these values will result in smaller Imenu lists, as arguments to
functions are not listed.

See the variable `py-imenu-show-method-args-p' for more
information.
(defvar py-imenu-method-no-arg-parens '(2 8) (#$ . 26226))
#@223 Indices into groups of the Python regexp for use with imenu.
Using these values will result in large Imenu lists, as arguments to
functions are listed.

See the variable `py-imenu-show-method-args-p' for more
information.
(defvar py-imenu-method-arg-parens '(2 7) (#$ . 26521))
#@233 Generic Python expression which may be used directly with Imenu.
Used by setting the variable `imenu-generic-expression' to this value.
Also, see the function \[py-imenu-create-index] for a better
alternative for finding the index.
(defvar py-imenu-generic-expression (byte-code "\303	Q\nB\207" [py-imenu-class-regexp py-imenu-method-regexp py-imenu-method-no-arg-parens "\\|"] 3) (#$ . 26806))
(byte-code "\301B\302\301!\204 \303\301\304\"\210\305B\302\305!\204 \303\305\304\"\210\304\207" [current-load-list py-imenu-generic-regexp default-boundp set-default nil py-imenu-generic-parens] 3)
#@200 Python interface function for the Imenu package.
Finds all Python classes and functions/methods. Calls function
\[py-imenu-create-index-engine].  See that function for the details
of how this works.
(defalias 'py-imenu-create-index-function #[nil "@\n\203 \202\f \feb\210\306\307!\207" [py-imenu-generic-expression py-imenu-generic-regexp py-imenu-show-method-args-p py-imenu-method-arg-parens py-imenu-method-no-arg-parens py-imenu-generic-parens py-imenu-create-index-engine nil] 2 (#$ . 27413)])
#@1181 Function for finding Imenu definitions in Python.

Finds all definitions (classes, methods, or functions) in a Python
file for the Imenu package.

Returns a possibly nested alist of the form

	(INDEX-NAME . INDEX-POSITION)

The second element of the alist may be an alist, producing a nested
list as in

	(INDEX-NAME . INDEX-ALIST)

This function should not be called directly, as it calls itself
recursively and requires some setup.  Rather this is the engine for
the function \[py-imenu-create-index-function].

It works recursively by looking for all definitions at the current
indention level.  When it finds one, it adds it to the alist.  If it
finds a definition at a greater indentation level, it removes the
previous definition from the alist. In its place it adds all
definitions found at the next indentation level.  When it finds a
definition that is less indented then the current level, it returns
the alist it has created thus far.

The optional argument START-INDENT indicates the starting indentation
at which to continue looking for Python classes, methods, or
functions.  If this is not supplied, the function uses the indentation
of the first definition found.
(defalias 'py-imenu-create-index-engine #[(&optional start-indent) "\306\211\211\211\211\211\211@\211A@)\307d\310#\203\325 \212\224\2034 \2025 \n\311\224\225\")\312 \313\216\314\315!\210*\316 \210\317 )\224\206[ \n\224\204d \204m \320 \204\300 U\203\205 \fBB\202\300 W\203\266 \321e\322#\210\323!\211\203\300 \211A@BBB)\202\300 \306\321e\310#\210\203% \307d\322#\211\204* \237.	\207" [py-imenu-generic-parens x def-paren class-paren def-pos cur-indent nil re-search-forward t buffer-substring-no-properties match-data ((set-match-data save-match-data-internal)) py-beginning-of-def-or-class either beginning-of-line current-indentation py-in-literal re-search-backward move py-imenu-create-index-engine prev-name def-name looking-p sub-method-alist index-alist py-imenu-generic-regexp cur-paren save-match-data-internal start-indent save-elmt] 10 (#$ . 27925)])
#@246 Choose CPython or JPython mode by looking at #! on the first line.
Returns the appropriate mode function.
Used by `py-choose-shell', and similar to but distinct from
`set-auto-mode', though it uses `auto-mode-interpreter-regexp' (if available).
(defalias 'py-choose-shell-by-shebang #[nil "\306\300!\203\n \202 \307\212eb\210\310	!\203 \311\312!\202 \313)\314\315\316\n!\f\"\211\2053 \211AA)@+\207" [auto-mode-interpreter-regexp re interpreter elt py-shell-alist x boundp "#![ 	]?\\([^ 	\n]*/bin/env[ 	]\\)?\\([^ 	\n]+\\)" looking-at match-string 2 "" nil assoc file-name-nondirectory] 4 (#$ . 30072)])
#@218 Choose CPython or JPython mode based imports.
If a file imports any packages in `py-jpython-packages', within
`py-import-check-point-max' characters from the start of the file,
return `jpython', otherwise return nil.
(defalias 'py-choose-shell-by-import #[nil "\303\212eb\210\204  \304\305	\306#\203  \307\310!\n\235\205 \311\211\203\n ))\207" [mode py-import-check-point-max py-jpython-packages nil search-forward-regexp "^\\(\\(from\\)\\|\\(import\\)\\) \\([^ 	\n.]+\\)" t match-string 4 jpython] 5 (#$ . 30692)])
#@263 Choose CPython or JPython mode. Returns the appropriate mode function.
This does the following:
 - look for an interpreter with `py-choose-shell-by-shebang'
 - examine imports using `py-choose-shell-by-import'
 - default to the variable `py-default-interpreter'
(defalias 'py-choose-shell #[nil "\301 \206 \302 \206 \207" [py-default-interpreter py-choose-shell-by-shebang py-choose-shell-by-import] 1 (#$ . 31220) nil])
#@717 Major mode for editing Python files.
To submit a problem report, enter `\[py-submit-bug-report]' from a
`python-mode' buffer.  Do `\[py-describe-mode]' for detailed
documentation.  To see what version of `python-mode' you are running,
enter `\[py-version]'.

This mode knows about Python indentation, tokens, comments and
continuation lines.  Paragraphs are separated by blank lines only.

COMMANDS
\{py-mode-map}
VARIABLES

py-indent-offset		indentation increment
py-block-comment-prefix		comment string used by `comment-region'
py-python-command		shell command to invoke Python interpreter
py-temp-directory		directory used for temp files (if needed)
py-beep-if-tab-change		ring the bell if `tab-width' is changed
(defalias 'python-mode #[nil "\306 \210\307\305!\210\307\310!\210\307\311!\210\307\312!\210\307\313!\210\307\314!\210\307\315!\210\307\316!\210\307\317!\210\307\320!\210\307\321!\210\307\322!\210\307\323!\210\324!\210\325\326\327\330\211	\331\n\332\333\f\334\335\336\337\340\341\342\3439!\210:\203v \344:!\210\345\346!\203 \347&\347\350\351\217\203\233 \352;<=\353\354!\203\233 \354\355\356\357\n#!\2101\203\247 \360\361!\210\202\253 \360\362!\210>\203\335 ?@\347\363\364\217\203\315 ?\365X\203\315 ?\366Y\203\315 ?@@?A?U\204\334 \347B)C?\205\347 \367\370 !\207" [py-mode-syntax-table major-mode mode-name python-mode-abbrev-table local-abbrev-table font-lock-defaults kill-all-local-variables make-local-variable paragraph-separate paragraph-start require-final-newline comment-start comment-end comment-start-skip comment-column comment-indent-function indent-region-function indent-line-function add-log-current-defun-function fill-paragraph-function set-syntax-table python-mode "Python" (python-font-lock-keywords) "^[ 	]*$" t "# " "" "# *" 40 py-comment-indent-function py-indent-region py-indent-line py-current-defun py-fill-paragraph use-local-map easy-menu-add boundp comment-multi-line nil (byte-code "\300\301!\207" [require imenu] 2) ((error)) py-imenu-create-index-function fboundp imenu-add-to-menubar format "%s-%s" "IM" run-hooks python-mode-hook py-mode-hook (py-guess-indent-offset) ((error)) 8 2 py-toggle-shells py-choose-shell py-mode-map py-menu imenu-create-index-function py-imenu-generic-expression imenu-generic-expression py-smart-indentation py-indent-offset offset tab-width indent-tabs-mode py-which-shell] 6 (#$ . 31651) nil])
#@211 Major mode for editing JPython/Jython files.
This is a simple wrapper around `python-mode'.
It runs `jpython-mode-hook' then calls `python-mode.'
It is added to `interpreter-mode-alist' and `py-choose-shell'.

(defalias 'jpython-mode #[nil "\301 \210\302\303!\210\205 \304\300!\207" [jpython-mode-hook python-mode py-toggle-shells jpython run-hooks] 2 (#$ . 34082) nil])
(byte-code "\303\304@	\"\204 @	BA\211\204 )\305\306\n\"\204) \305\307\n\"\204) \310\nB\304\207" [modes interpreter-mode-alist auto-mode-alist (("jpython" . jpython-mode) ("jython" . jpython-mode) ("python" . python-mode)) assoc rassq python-mode jpython-mode ("\\.py$" . python-mode)] 4)
#@62 Returns non-nil if the current line should dedent one level.
(defalias 'py-outdent-p #[nil "\212\303 \210\304!\205- o?\205- \305y\210\306 \210\303 \210\304	!\204\" o\203) \307\310!\210\202 \304\n!?)\207" [py-outdent-re py-blank-or-comment-re py-no-outdent-re back-to-indentation looking-at -1 py-goto-initial-line backward-to-indentation 1] 2 (#$ . 34758)])
#@218 Insert a colon.
In certain cases the line is dedented appropriately.  If a numeric
argument ARG is provided, that many colons are inserted
non-electrically.  Electric behavior is inhibited inside a string or
comment.
(defalias 'py-electric-colon #[(arg) "\306\307!!\210\212\310\212\311 \210`)`\"\312	8\206 \313	8*?\205W \212`\314\315\316!\204A \317 \203A \n\212\320\321!\210\315\316!)U\203A \322 \nW?\205V \fb\210\323 \210\324 \210\nZj,\207" [arg pps indent outdent here py-indent-offset self-insert-command prefix-numeric-value parse-partial-sexp py-beginning-of-def-or-class 3 4 0 py-compute-indentation t py-outdent-p py-next-statement -1 current-indentation beginning-of-line delete-horizontal-space] 4 (#$ . 35125) "*P"])
#@227 Send to Python interpreter process PROC "execfile('FILENAME')".
Make that process's buffer visible and force display.  Also make
comint believe the user typed this string so that
`kill-output-from-shell' does The Right Thing.
(defalias 'py-execute-file #[(proc filename) "p\306!\307\310	\"\307\311	\"\312\216\212\fq\210db\210\313!`\314\223\210\315!\"\210*\316\n\",\207" [proc filename cmd msg procbuf curbuf process-buffer format "## working on region in file %s...\n" "execfile(r'%s')\n" ((set-buffer curbuf)) process-mark nil process-filter process-send-string] 6 (#$ . 35869)])
#@136 Watch output for Python prompt and exec next file waiting in queue.
This function is appropriate for `comint-output-filter-functions'.
(defalias 'py-comint-output-filter-function #[(string) "\303\230\204 G\304Y\2054 \305\306O\307\230\2054 	\2054 \310p!\210\306\311\312\217\210	A\211\2054 \313p!\314\n	@\")\207" [string py-file-queue pyproc ">>> " 5 -5 nil "\n>>> " pop-to-buffer (byte-code "\301@!\207" [py-file-queue delete-file] 2) ((error)) get-buffer-process py-execute-file] 4 (#$ . 36467)])
#@62 Activate or de arrow at beginning-of-line in current buffer.
(defalias 'py-pdbtrack-overlay-arrow #[(activation) "\203\201 \306 \307	\310`\310=\203 \311 \210\202u \312=\203& \313\210\202u \314=\2033 \315\316!\210\202u \317=\203@ \320\316!\210\202u \321=\203L \322 \210\202u \323=\203X \324 \210\202u \325=\203d \326 \210\202u \327=\203p \330 \210\202u \331\332\"\210`\fb\210*p\223\210\333\211\207	\205\212 \313\211\211\207" [activation overlay-arrow-position overlay-arrow-string position here py-pdbtrack-is-tracking-p make-marker "=>" bol beginning-of-line eol nil bod py-beginning-of-def-or-class either eod py-end-of-def-or-class bob beginning-of-buffer eob end-of-buffer boi back-to-indentation bos py-goto-initial-line error "Unknown buffer position requested: %s" t] 5 (#$ . 36977)])
#@655 Show the file indicated by the pdb stack entry line, in a separate window.

Activity is disabled if the buffer-local variable
`py-pdbtrack-do-tracking-p' is nil.

We depend on the pdb input prompt matching `py-pdbtrack-input-prompt'
at the beginning of the line.

If the traceback target file path is invalid, we look for the most
recently visited python-mode buffer which either has the name of the
current function (or class) or which defines the function (or
class).  This is to provide for remote scripts, eg, Zope's 'Script
(Python)' - put a _copy_ of the script in a buffer named for the
script, and set to python-mode, and pdbtrack will find it.)
(defalias 'py-pdbtrack-track-stack-file #[(text) "p\306!\211\203 \n\204 \307\310!\202\202 \311	!\fZ]{\310\211\310\211\312\313P\"\204> \307\310!\202\200 \314!\211;\203Q \315\316\"\202\200 @\211A@)\317!\320!\210\321!\210\315\322#\210\307\323!\210\324\323\".*\207" [origbuf currproc py-pdbtrack-do-tracking-p procmark comint-last-input-end py-pdbtrack-track-range get-buffer-process py-pdbtrack-overlay-arrow nil process-mark string-match "$" py-pdbtrack-get-source-buffer message "pdbtrack: %s" buffer-file-name switch-to-buffer-other-window goto-line "pdbtrack: line %s, file %s" t pop-to-buffer block target target_fname target_lineno target_buffer py-pdbtrack-input-prompt x] 5 (#$ . 37794)])
#@371 Return line number and buffer of code indicated by block's traceback text.

We look first to visit the file indicated in the trace.

Failing that, we look for the most recently visited python-mode buffer
with the same name or having 
having the named function.

If we're unable find the source code we return a string describing the
problem as best as we can determine.
(defalias 'py-pdbtrack-get-source-buffer #[(block) "\306	\"\204	 \307\207\310\311	\"\312\310\313	\"!\310\314	\"\315\316\n!\203* \317\n!D\202g \320\f\"\211\203S \306\321\n\"\203M \212q\210\322ee\306\323ed{\"]\")\\D\202g \n\324\234\325U\203b \326\327\n\"\202g \326\330\f\n#,\207" [py-pdbtrack-stack-entry-regexp block filename lineno funcname funcbuffer string-match "Traceback cue not found" match-string 1 string-to-int 2 3 nil file-exists-p find-file-noselect py-pdbtrack-grub-for-buffer "/Script (Python)$" count-lines "^\\([^#]\\|#[^#]\\|#$\\)" 0 60 format "(Non-file source: '%s')" "Not found: %s(), %s"] 8 (#$ . 39202)])
#@254 Find most recent buffer itself named or having function funcname.

We first check the last buffer this function found, if any, then walk
throught the buffer-list history for python-mode buffers that are
named for funcname or define a function funcname.
(defalias 'py-pdbtrack-grub-for-buffer #[(funcname lineno) "\306 \307\211\n\203? \204? \n@\nA\212	q\210\310\230)\203 \311\f\312	!\"\204: \311\313\f\314Q\212	q\210ed{)\"\203 	\202 \211+\207" [got buf buffers major-mode funcname py-pdbtrack-last-grubbed-buffer buffer-list nil "python-mode" string-match buffer-name "^\\s-*\\(def\\|class\\)\\s-+" "\\s-*("] 4 (#$ . 40218)])
#@110 Highlight exceptions found in BUF.
If an exception occurred return t, otherwise return nil.  BUF must exist.
(defalias 'py-postprocess-output-buffer #[(buf) "\306\211\211\211\212\fq\210\307 \210\310\306\311#\203R\312\313!\314\312\315!!\301'`('\301=\2034 \316 \210\202\227 '\317=\203A \306\210\202\227 '\320=\203O \321\322!\210\202\227 '\323=\203] \324\322!\210\202\227 '\325=\203j \307 \210\202\227 '\326=\203w \327 \210\202\227 '\330=\203\204 \331 \210\202\227 '\332=\203\221 \333 \210\202\227 \334\335'\"\210`(b\210*\211\317'`('\301=\203\262 \316 \210\202'\317=\203\277 \306\210\202'\320=\203\315 \321\322!\210\202'\323=\203\333 \324\322!\210\202'\325=\203\350 \307 \210\202'\326=\203\365 \327 \210\202'\330=\203\331 \210\202'\332=\203\333 \210\202\334\335'\"\210`(b\210*\n)*\336\337!\203L\337*)\"+\340+\341\342#\210\340+\343\nB#\210\340+\344,#)\202M\311\210,\202 )-\203f\203f\345 \210\346\n\"\210\311,\207" [err-p bol file line buf py-traceback-line-re nil beginning-of-buffer re-search-forward t match-string 1 string-to-int 2 beginning-of-line eol bod py-beginning-of-def-or-class either eod py-end-of-def-or-class bob eob end-of-buffer boi back-to-indentation bos py-goto-initial-line error "Unknown buffer position requested: %s" fboundp make-extent set-extent-property mouse-face highlight py-exc-info keymap beep py-jump-to-exception position here to from e py-mode-output-map py-jump-on-exception] 6 (#$ . 40863)])
(byte-code "\302B\303\302!\204 \304\302\305\"\210\306B\303\306!\204 \304\306\307\"\210\310B\311\312!\210\313\310!\210\314B\303\314!\2049 \304\314\307\"\210\315B\303\315!\204H \304\315	\"\210\316B\303\316!\204W \304\316\317\"\210\313\314!\210\313\315!\210\313\316!\207" [current-load-list py-python-command-args py-serial-number default-boundp set-default 0 py-exception-buffer nil py-output-buffer (lambda (#1=#:defconst-tmp-var) (defconst py-output-buffer #1#)) "*Python Output*" make-variable-buffer-local py-which-shell py-which-args py-which-bufname "Python"] 3)
#@363 Toggles between the CPython and JPython shells.

With positive argument ARG (interactively \[universal-argument]),
uses the CPython shell, with negative ARG uses the JPython shell, and
with a zero argument, toggles the shell.

Programmatically, ARG can also be one of the symbols `cpython' or
`jpython', equivalent to positive arg and negative arg respectively.
(defalias 'py-toggle-shells #[(arg) "\204 \306\306\232\203 	\307\230\203 \310\202/ \311\202/ \312\232\203' \311\202/ \313\232\203/ \310\314\306W\203F \307\315\307\202Z \306V\203Z \316\211\316\317\320\n\"\210\321\322	\"\211)\207" [arg py-which-bufname msg py-python-command py-which-shell py-python-command-args 0 "Python" -1 1 cpython jpython nil "CPython" "JPython" message "Using the %s shell" format "*%s Output*" py-which-args mode-name py-jpython-command py-jpython-command-args py-output-buffer] 4 (#$ . 42954) "P"])
#@1995 Start an interactive Python interpreter in another window.
This is like Shell mode, except that Python is running in the window
instead of a shell.  See the `Interactive Shell' and `Shell Mode'
sections of the Emacs manual for details, especially for the key
bindings active in the `*Python*' buffer.

With optional \[universal-argument], the user is prompted for the
flags to pass to the Python interpreter.  This has no effect when this
command is used to switch to an existing process, only when a new
process is started.  If you use this, you will probably want to ensure
that the current arguments are retained (they will be included in the
prompt).  This argument is ignored when this function is called
programmatically, or when running in Emacs 19.34 or older.

Note: You can toggle between using the CPython interpreter and the
JPython interpreter by hitting \[py-toggle-shells].  This toggles
buffer local variables which control whether all your subshell
interactions happen to the `*JPython*' or `*Python*' buffers (the
latter is the name used for the CPython buffer).

Warning: Don't use an interactive Python if you change sys.ps1 or
sys.ps2 from their default values, or if you're running code that
prints `>>> ' or `... ' at the start of a line.  `python-mode' can't
distinguish your output from Python's output, and assumes that `>>> '
at the start of a line is a prompt from Python.  Similarly, the Emacs
Shell mode code assumes that both `>>> ' and `... ' at the start of a
line are Python prompts.  Bad things can happen if you fool either
mode.

Warning:  If you do any editing *in* the process buffer *while* the
buffer is accepting output from Python, do NOT attempt to `undo' the
changes.  Some of the output (nowhere near the parts you changed!) may
be lost if you do.  This appears to be an Emacs bug, an unfortunate
interaction between undo and process filters; the same problem exists in
non-Python process buffers using the default (Emacs-supplied) process
filter.
(defalias 'py-shell #[(&optional argprompt) "\204 \306	!\210\n\f\203' t\203' \307\310!\203' \310\311\312P\313\314\n\315#\315P\"!\316\317\320\321%!\210\322\323!\210\324\325\326\327\"\210\325\326\330\"\210\331\332!\210\333 !\210\334\335!)\207" [py-which-shell py-default-interpreter py-which-args args argprompt py-which-bufname py-toggle-shells fboundp split-string read-string " arguments: " mapconcat identity " " switch-to-buffer-other-window apply make-comint nil make-local-variable comint-prompt-regexp "^>>> \\|^[.][.][.] \\|^(pdb) " add-hook comint-output-filter-functions py-comint-output-filter-function py-pdbtrack-track-stack-file t set-syntax-table use-local-map run-hooks py-shell-hook py-pdbtrack-do-tracking-p py-mode-syntax-table py-shell-map] 7 (#$ . 43884) "P"])
#@56 Clear the queue of temporary files waiting to execute.
(defalias 'py-clear-queue #[nil "G\302\303\"\210\304\305\306	\")\207" [py-file-queue n mapcar delete-file nil message "%d pending files de-queued."] 3 (#$ . 46680) nil])
#@1074 Execute the region in a Python interpreter.

The region is first copied into a temporary file (in the directory
`py-temp-directory').  If there is no Python interpreter shell
running, this file is executed synchronously using
`shell-command-on-region'.  If the program is long running, use
\[universal-argument] to run the command asynchronously in its own
buffer.

When this function is used programmatically, arguments START and END
specify the region to execute, and optional third argument ASYNC, if
non-nil, specifies to run the command asynchronously in its own
buffer.

If the Python interpreter shell is running, the region is execfile()'d
in that shell.  If you try to execute regions too quickly,
`python-mode' will queue them up and execute them one at a time when
it sees a `>>> ' prompt from Python.  Each time this happens, the
process buffer is popped into a window (if it's not already in some
window) so you can see it, and a comment of the form

    	## working on region in file <name>...

is inserted at the end.  See also the command `py-clear-queue'.
(defalias 'py-execute-region #[(start end &optional async) "\306!\307\n>\203, \310\311!\205 \311 T\f\203$ \312\313\f#\202( \312\314\"*\202/ \315\316!@\317@A\"\320PBpC\321B!D\322E\212Fb\210\323 \210\324\325!\203b `GW\203b \326y\210\202O `\211FGW\204p \327\330!\210\331H`IH\331=\203\203 \323 \210\202\346 H\332=\203\220 \322\210\202\346 H\333=\203\236 \334\335!\210\202\346 H\336=\203\254 \337\335!\210\202\346 H\340=\203\271 \341 \210\202\346 H\342=\203\306 \343 \210\202\346 H\344=\203\323 \345 \210\202\346 H\346=\203\340 \347 \210\202\346 \327\350H\"\210`Ib\210*\344H`IH\331=\203\377 \323 \210\202bH\332=\203\f\322\210\202bH\333=\203\334\335!\210\202bH\336=\203(\337\335!\210\202bH\340=\2035\341 \210\202bH\342=\203B\343 \210\202bH\344=\203O\345 \210\202bH\346=\203\\\347 \210\202b\327\350H\"\210`Ib\210*U?JDq\210\351 \210J\203{\352c\210\353CFG#\210\354 \206\220\355 \206\220KE*L\203\324\212Dq\210\356edB\322\357%\210)\360M!D\361\230\203\267\362\202\270\363N\364DENB%\210\365D!\210\366D!\210*\202T	\203\212Dq\210\356edB\322\357%\210)O\204\365\367	B\"\210\202\373\370\371B\"\210\372OBC\"OBpBP\202TE\373\230\203\374\202\363PQ\212Dq\210\375edQM$\210)\376M!\204:\370\377!\210\202SpP\366M!R\365M!\210R\203R\365P!\210))\201S D!.\207" [py-which-bufname proc py-emacs-features py-serial-number pid sn get-process broken-temp-names fboundp emacs-pid format "python-%d-%d" "python-%d" make-temp-name "python-" expand-file-name ".py" get-buffer-create nil beginning-of-line looking-at "\\s *$" 1 error "Region is empty" bol eol bod py-beginning-of-def-or-class either eod py-end-of-def-or-class bob beginning-of-buffer eob end-of-buffer boi back-to-indentation bos py-goto-initial-line "Unknown buffer position requested: %s" python-mode "if 1:\n" insert-buffer-substring py-choose-shell-by-shebang py-choose-shell-by-import write-region nomsg generate-new-buffer-name "Python" "-u" "" start-process pop-to-buffer py-postprocess-output-buffer py-execute-file message "File %s queued for execution" append "JPython" " -" shell-command-on-region get-buffer "No output." temp py-temp-directory file cur buf shell start end position here needs-if py-which-shell async py-output-buffer arg py-file-queue py-exception-buffer cmd err-p kill-buffer] 7 (#$ . 46917) "r\nP"])
#@480 Send the contents of the buffer to a Python interpreter.
If the file local variable `py-master-file' is non-nil, execute the
named file instead of the buffer's file.

If there is a *Python* process buffer it is used.  If a clipping
restriction is in effect, only the accessible portion of the buffer is
sent.  A trailing newline will be supplied if needed.

See the `\[py-execute-region]' docs for an account of some
subtleties, including the use of the optional ASYNC argument.
(defalias 'py-execute-buffer #[(&optional async) "\203 \304!\305	!\206 \306	!\211q\210*\307ed#\207" [py-master-file filename buffer async expand-file-name get-file-buffer find-file-noselect py-execute-region] 5 (#$ . 50384) "P"])
#@933 Import the current buffer's file in a Python interpreter.

If the file has already been imported, then do reload instead to get
the latest version.

If the file's name does not end in ".py", then do execfile instead.

If the current buffer is not visiting a file, do `py-execute-buffer'
instead.

If the file local variable `py-master-file' is non-nil, import or
reload the named file instead of the buffer's file.  The file may be
saved based on the value of `py-execute-import-or-reload-save-p'.

See the `\[py-execute-region]' docs for an account of some
subtleties, including the use of the optional ASYNC argument.

This may be preferable to `\[py-execute-buffer]' because:

 - Definitions stay in their module rather than appearing at top
   level, where they would clutter the global namespace and not affect
   uses of qualified names (MODULE.NAME).

 - The Python debugger gets line number information about the functions.
(defalias 'py-execute-import-or-reload #[(&optional async) "\203 \306!\307	!\206 \310	!\211q\210*\311p!\211\203F \312\f?\313\"\210\314\315\316\"\203< \317\320!!\321\322\211\211$)\202@ \321\323\"\"\202J \324!)\207" [py-master-file filename buffer file py-ask-about-save f expand-file-name get-file-buffer find-file-noselect buffer-file-name save-some-buffers nil py-execute-string string-match "\\.py$" file-name-sans-extension file-name-nondirectory format "if globals().has_key('%s'):\n    reload(%s)\nelse:\n    import %s\n" "execfile(r'%s')\n" py-execute-buffer async] 7 (#$ . 51107) "P"])
#@245 Send the current function or class definition to a Python interpreter.

If there is a *Python* process buffer it is used.

See the `\[py-execute-region]' docs for an account of some
subtleties, including the use of the optional ASYNC argument.
(defalias 'py-execute-def-or-class #[(&optional async) "\212\301 \210\302\303 `#)\207" [async py-mark-def-or-class py-execute-region mark] 4 (#$ . 52655) "P"])
#@224 Send the argument STRING to a Python interpreter.

If there is a *Python* process buffer it is used.

See the `\[py-execute-region]' docs for an account of some
subtleties, including the use of the optional ASYNC argument.
(defalias 'py-execute-string #[(string &optional async) "\212\302\303\304!!q\210c\210\305ed	#)\207" [string async get-buffer-create generate-new-buffer-name " *Python Command*" py-execute-region] 4 (#$ . 53067) "sExecute Python command: "])
#@42 Jump to the Python code in FILE at LINE.
(defalias 'py-jump-to-exception #[(file line) "\305\230\203 	:\203 	A\2024 	\2024 	:\203% 	@\230\203% 	A\2024 \306\307\310\217\2064 \311\312\313\306\314$!\315\n!\210\316=\204B \316 \210\317\f!\210\320\321\f#)\207" [file py-exception-buffer buffer major-mode line "<stdin>" nil (find-file-noselect file) ((error)) find-file read-file-name "Exception file: " t pop-to-buffer python-mode goto-line message "Jumping to exception in file %s on line %d"] 6 (#$ . 53538)])
#@94 Jump to the code which caused the Python exception at EVENT.
EVENT is usually a mouse click.
(defalias 'py-mouseto-exception #[(event) "\305\306!\2056 \306!\307!	\205 \n\205 \310	\n\311#\211\205$ \312\311\"\313\314	\f#\210\f\2055 \315\f@\fA\",\207" [event point buffer e info fboundp event-point event-buffer extent-at py-exc-info extent-property message "Event point: %d, info: %s" py-jump-to-exception] 5 (#$ . 54059) "e"])
#@44 Go to the line indicated by the traceback.
(defalias 'py-goto-exception #[nil "\303\211\212\304 \210\305\n!\203 \306\307!\310\306\311!!)	\204! \312\313!\210\314	\"*\207" [line file py-traceback-line-re nil beginning-of-line looking-at match-string 1 string-to-int 2 error "Not on a traceback line" py-jump-to-exception] 3 (#$ . 54500) nil])
#@375 Find the next Python exception and jump to the code that caused it.
START is the buffer position in BUFFER from which to begin searching
for an exception.  SEARCHDIR is a function, either
`re-search-backward' or `re-search-forward' indicating the direction
to search.  ERRWHERE is used in an error message if the limit (top or
bottom) of the trackback stack is encountered.
(defalias 'py-find-next-exception #[(start buffer searchdir errwhere) "\306\211\212\nq\210`\f\307=\203 \310 \210\202s \f\311=\203$ \306\210\202s \f\312=\2031 \313\314!\210\202s \f\315=\203> \316\314!\210\202s \f\317=\203J \320 \210\202s \f\321=\203V \322 \210\202s \f\323=\203b \324 \210\202s \f\325=\203n \326 \210\202s \327\330\f\"\210`b\210*b\210 !\306\331#\203\216 \332\333!\334\332\335!!)	\203\236 \203\236 \336	\"\202\243 \327\337\"\"*\207" [line file buffer start position here nil bol beginning-of-line eol bod py-beginning-of-def-or-class either eod py-end-of-def-or-class bob beginning-of-buffer eob end-of-buffer boi back-to-indentation bos py-goto-initial-line error "Unknown buffer position requested: %s" t match-string 1 string-to-int 2 py-jump-to-exception "%s of traceback" searchdir py-traceback-line-re errwhere] 4 (#$ . 54854)])
#@181 Go to the next line down in the traceback.
With \[univeral-argument] (programmatically, optional argument
BOTTOM), jump to the bottom (innermost) exception in the exception
stack.
(defalias 'py-down-exception #[(&optional bottom) "\304\305!\211\203\f \306\202 	\203 \307\310\n\311\312$\202! \307\313\n\314\312$*\207" [proc py-output-buffer buffer bottom get-process "Python" "*Python*" py-find-next-exception eob re-search-backward "Bottom" eol re-search-forward] 6 (#$ . 56099) "P"])
#@177 Go to the previous line up in the traceback.
With \[universal-argument] (programmatically, optional argument TOP)
jump to the top (outermost) exception in the exception stack.
(defalias 'py-up-exception #[(&optional top) "\304\305!\211\203\f \306\202 	\203 \307\310\n\311\312$\202! \307\313\n\314\312$*\207" [proc py-output-buffer buffer top get-process "Python" "*Python*" py-find-next-exception bob re-search-forward "Top" bol re-search-backward] 6 (#$ . 56596) "P"])
#@1083 Delete preceding character or levels of indentation.
Deletion is performed by calling the function in `py-backspace-function'
with a single argument (the number of characters to delete).

If point is at the leftmost column, delete the preceding newline.

Otherwise, if point is at the leftmost non-whitespace character of a
line that is neither a continuation line nor a non-indenting comment
line, or if point is at the end of a blank line, this command reduces
the indentation to match that of the line that opened the current
block of code.  The line that opened the block is displayed in the
echo area to help you keep track of where you are.  With
\[universal-argument] dedents that many blocks (but not past column
zero).

Otherwise the preceding character is deleted, converting a tab to
spaces if needed so that only a single column position is deleted.
\[universal-argument] specifies how many characters to delete;
default is 1.

When used programmatically, argument ARG specifies the number of
blocks to dedent, or the number of characters to delete, as indicated
above.
(defalias 'py-electric-backspace #[(arg) "\305 iU\203 n\204 \306 \203 	!\207\307\310\311\"\210\312u\210\313\314\315\212\313	W\2034 \315\316\317\217\210	S\202# )\320\311!\210\321 \210\fj\210\n\205G \322\323\"+\207" [py-backspace-function arg base-found-p base-text base-indent current-indentation py-continuation-line-p insert-char 42 1 -1 0 "" nil (byte-code "\303\304!\210\305 \306 \307\303\207" [base-indent base-text base-found-p py-goto-block-up no-mark current-indentation py-suck-up-leading-text t] 2) ((error)) delete-char delete-horizontal-space message "Closes block: %s"] 3 (#$ . 57079) "*p"])
#@598 Delete preceding or following character or levels of whitespace.

The behavior of this function depends on the variable
`delete-key-deletes-forward'.  If this variable is nil (or does not
exist, as in older Emacsen and non-XEmacs versions), then this
function behaves identically to \[c-electric-backspace].

If `delete-key-deletes-forward' is non-nil and is supported in your
Emacs, then deletion occurs in the forward direction, by calling the
function in `py-delete-function'.

\[universal-argument] (programmatically, argument ARG) specifies the
number of characters to delete (default is 1).
(defalias 'py-electric-delete #[(arg) "\303\304!\203 \304 \204 \305\300!\203 \203 	\n!\207\306\n!\207" [delete-key-deletes-forward py-delete-function arg fboundp delete-forward-p boundp py-electric-backspace] 2 (#$ . 58784) "*p"])
(byte-code "\300\301\302\303#\210\300\301\304\303#\210\300\305\302\306#\210\300\305\304\306#\210\300\307\302\306#\210\300\307\304\306#\207" [put py-electric-colon delete-selection t pending-delete py-electric-backspace supersede py-electric-delete] 4)
#@348 Fix the indentation of the current line according to Python rules.
With \[universal-argument] (programmatically, the optional argument
ARG non-nil), ignore dedenting rules for block closing statements
(e.g. return, raise, break, continue, pass)

This function is normally bound to `indent-line-function' so
\[indent-for-tab-command] will call it.
(defalias 'py-indent-line #[(&optional arg) "\305 iX\306\n?!\307 \203 \fZU\204& \212\310 \210\311 \210j\210)	\205, \312 +\207" [ci move-to-indentation-p arg need py-indent-offset current-indentation py-compute-indentation py-outdent-p beginning-of-line delete-horizontal-space back-to-indentation] 2 (#$ . 59876) "P"])
#@294 Strives to act like the Emacs `newline-and-indent'.
This is just `strives to' because correct indentation can't be computed
from scratch for Python code.  In general, deletes the whitespace before
point, inserts a newline, and takes an educated guess as to how you want
the new line indented.
(defalias 'py-newline-and-indent #[nil "\301 \211iW\203 \302 \202 \303 \210\304\305\306\"\210\307!)\207" [ci current-indentation newline-and-indent beginning-of-line insert-char 10 1 move-to-column] 4 (#$ . 60559) nil])
#@166 Compute Python indentation.
When HONOR-BLOCK-CLOSE-P is non-nil, statements such as `return',
`raise', `break', `continue', and `pass' force one level of
dedenting.
(defalias 'py-compute-indentation #[(honor-block-close-p) "\212\306 \210\302`\307=\203 \306 \210\202o \310=\203  \311\210\202o \302=\203- \312\313!\210\202o \314=\203: \315\313!\210\202o \316=\203F \317 \210\202o \320=\203R \321 \210\202o \322=\203^ \323 \210\202o \324=\203j \325 \210\202o \326\327\"\210`	b\210*\330\n`\"\330\n\322`\307=\203\214 \306 \210\202\347 \310=\203\230 \311\210\202\347 \302=\203\245 \312\313!\210\202\347 \314=\203\262 \315\313!\210\202\347 \316=\203\276 \317 \210\202\347 \320=\203\312 \321 \210\202\347 \322=\203\326 \323 \210\202\347 \324=\203\342 \325 \210\202\347 \326\327\"\210`	b\210*\"\311\3318\203\374 \331\f8\204\3328\203 \332\f8\203 \2129\204\333\202\334\335\311\336#\210\323 \210i)\202\360\337 \203)`\340 \311\211\211\211:;<=>?>\203\240>Tb\210\341\311w\210g\342>\204Pi\202$\343y\210`?W\203f\344\345!\203f\343y\210\202S`?W\203\204?\212>Tb\210\346d!\210`)U\204\204\347 \202$>b\210`\325 \210\350\212\331\330`\"8)!\210\347 @\\\202$\351y\210\337 \203\255\347 \202$\311\210`=\352<\323 \210`?<\203\353=w\210`=U\203\324\311\211<\202\276\343u\210\330?`\":\354:@!\203\274\331:8\204\274\311<g\355=\206\374`\356Zf\357>?;\202\274;\203\344\360!\203?b\210\361\311w\210i\362 \203 A\202!\333\\\343\\.\202\360o\2032\347 \202\360\344\363!\203R\364\346!\203R\347 \212\346d[!\210\347 )X\203R\347 \202\360B\311=\203g\364\346!\203g\346d[!\210\202\271C\365P\311DED\204\270\334\366\311\336#\210o\206\262B\352=\203\223\212\323 \210\344E!)?\206\262B\352=?\205\262\212\323 \210\344E!?\205\261\344\367!\206\261\354i!?)\211D\203u*\350\331\330\n`\"8!\210`\325 \210\350\212\331\330`\"8)!\210\347 \362 \203\336@\202\357F\203\356\370 \203\356@[\202\357\333\\-\207" [position here bod pps boipps placeholder beginning-of-line bol eol nil py-beginning-of-def-or-class either eod py-end-of-def-or-class bob beginning-of-buffer eob end-of-buffer boi back-to-indentation bos py-goto-initial-line error "Unknown buffer position requested: %s" parse-partial-sexp 3 4 0 re-search-backward "^[ 	]*\\([^ 	\n#]\\|#[ 	\n]\\)" move py-continuation-line-p py-nesting-level " 	" (10 35 92) 1 looking-at "[ 	]*[#\n\\\\]" forward-comment current-indentation py-goto-beginning-of-tqs -1 t "^=" zerop 61 2 (60 62 33) "[ 	]*\\\\" "^ 	\n" py-statement-opens-block-p "[ 	]*#[^ 	\n]" fboundp "[ 	]*" "^[ 	]*\\([^ 	\n#]\\|#\\)" "[^#]" py-statement-closes-block-p py-align-multiline-strings-p state found searching endpos open-bracket-pos startpos py-indent-offset py-continuation-offset py-honor-comment-indentation py-block-comment-prefix done prefix-re honor-block-close-p] 7 (#$ . 61083)])
#@1062 Guess a good value for, and change, `py-indent-offset'.

By default, make a buffer-local copy of `py-indent-offset' with the
new value, so that other Python buffers are not affected.  With
\[universal-argument] (programmatically, optional argument GLOBAL),
change the global value of `py-indent-offset'.  This affects all
Python buffers (that don't have their own buffer-local copy), both
those currently existing and those created later in the Emacs session.

Some people use a different value for `py-indent-offset' than you use.
There's no excuse for such foolishness, but sometimes you have to deal
with their ugly code anyway.  This function examines the file and sets
`py-indent-offset' to what it thinks it was when they created the
mess.

Specifically, it searches forward from the statement containing point,
looking for a line that opens a block of code.  `py-indent-offset' is
set to the difference in indentation between that line and the Python
statement following it.  If the search doesn't succeed going forward,
it's tried again going backward.
(defalias 'py-guess-indent-offset #[(&optional global) "\306``\306\211\307 \210	\2049 m\2049 \310\311\306\312#\203 \313\n!\204 `\307 \210\314 \2033 \315\211\202 \nb\210\202 	\204] b\210\307 \210	\204] o\204] \316\311\306\312#\205X \307 \210\314 \211\203G \317 	\205i \320\321\322!!\317 Zb\210	\204| \323\324!\202\236 \203\204 \325\202\205 \326\327!\210\f\206\236 \330\331\203\232 \332\202\233 \333#-\207" [colon-indent found restart start new-value global nil py-goto-initial-line re-search-forward ":[ 	]*\\($\\|[#\\]\\)" move py-in-literal py-statement-opens-block-p t re-search-backward current-indentation zerop py-next-statement 1 error "Sorry, couldn't guess a value for py-indent-offset" kill-local-variable make-local-variable py-indent-offset message "%s value of py-indent-offset set to %d" "Global" "Local" noninteractive] 6 (#$ . 63970) "P"])
#@46 Python version of `comment-indent-function'.
(defalias 'py-comment-indent-function #[nil "\212\305 \210\302`\306=\203 \305 \210\202o \302=\203  \307\210\202o \310=\203- \311\312!\210\202o \313=\203: \314\312!\210\202o \315=\203F \316 \210\202o \317=\203R \320 \210\202o \321=\203^ \322 \210\202o \323=\203j \324 \210\202o \325\326\"\210`	b\210*\203\204 \327\n\330#\203\204 \331\224\nb\210\332\307x\210\fin\203\225 \331\202\226 \333\\]*\207" [position here eol comment-start-skip comment-column beginning-of-line bol nil bod py-beginning-of-def-or-class either eod py-end-of-def-or-class bob beginning-of-buffer eob end-of-buffer boi back-to-indentation bos py-goto-initial-line error "Unknown buffer position requested: %s" re-search-forward t 0 " 	" 1] 4 (#$ . 65918)])
#@180 Make text outside current defun invisible.
The defun visible is the one that contains point or follows point.
Optional CLASS is passed directly to `py-beginning-of-def-or-class'.
(defalias 'py-narrow-to-defun #[(&optional class) "\212~\210\302!\210`\303!\210`	}*\207" [class end py-end-of-def-or-class py-beginning-of-def-or-class] 2 (#$ . 66713) "P"])
#@49 Indent lines from START to END by COUNT spaces.
(defalias 'py-shift-region #[(start end count) "\212b\210\303 \210`	b\210\303 \210`\304	\n#)\207" [end start count beginning-of-line indent-rigidly] 4 (#$ . 67075)])
#@439 Shift region of Python code to the left.
The lines from the line containing the start of the current region up
to (but not including) the line containing the end of the region are
shifted to the left, by `py-indent-offset' columns.

If a prefix argument is given, the region is instead shifted by that
many columns.  With no active region, dedent only the current line.
You cannot dedent the region if any line is already at column zero.
(defalias 'py-shift-region-left #[(start end &optional count) "\212b\210`	W\203# \305 \210\306i!\203 \307\310!\204 \311\312!\210\313y\210\202 )\314	\315\n\206- ![#\210\316\304!\205: \317\211\207" [start end count py-indent-offset zmacs-region-stays back-to-indentation zerop looking-at "\\s *$" error "Region is at left edge" 1 py-shift-region prefix-numeric-value boundp t] 5 (#$ . 67300) (byte-code "`\304 \n\203 \n^\n]	E\202 \212\305y\210`)	E+\207" [current-prefix-arg arg m p mark 1] 3)])
#@373 Shift region of Python code to the right.
The lines from the line containing the start of the current region up
to (but not including) the line containing the end of the region are
shifted to the right, by `py-indent-offset' columns.

If a prefix argument is given, the region is instead shifted by that
many columns.  With no active region, indent only the current line.
(defalias 'py-shift-region-right #[(start end &optional count) "\305	\306\n\206	 !#\210\307\304!\205 \310\211\207" [start end count py-indent-offset zmacs-region-stays py-shift-region prefix-numeric-value boundp t] 5 (#$ . 68254) (byte-code "`\304 \n\203 \n^\n]	E\202 \212\305y\210`)	E+\207" [current-prefix-arg arg m p mark 1] 3)])
#@1539 Reindent a region of Python code.

The lines from the line containing the start of the current region up
to (but not including) the line containing the end of the region are
reindented.  If the first line of the region has a non-whitespace
character in the first column, the first line is left alone and the
rest of the region is reindented with respect to it.  Else the entire
region is reindented with respect to the (closest code or indenting
comment) statement immediately preceding the region.

This is useful when code blocks are moved or yanked, when enclosing
control structures are introduced or removed, or to reformat code
using a new value for the indentation offset.

If a numeric prefix argument is given, it will be used as the value of
the indentation offset.  Else the value of `py-indent-offset' will be
used.

Warning: The region must be consistently indented before this function
is called!  This function does not compute proper indentation from
scratch (that's impossible in Python), it merely adjusts the existing
indentation to be correct in context.

Warning: This function really has no idea what to do with
non-indenting comment lines, and shifts them as if they were indenting
comment lines.  Fixing this appears to require telepathy.

Special cases: whitespace is deleted from blank lines; continuation
lines are shifted by the same amount their initial line was shifted,
in order to preserve their relative indentation with respect to their
initial line; and comment lines beginning in column 1 are ignored.
(defalias 'py-indent-region #[(start end &optional indent-offset) "\212b\210\306 \210\307 	b\210\306 \210\310\n\206 !\311\312\211\313\314!\203& \315\316!\202' \312\317`W\203\246 \320 g\321=\204F \313\322!\203L \312\202\222 \323 \203Z \f\\\202\222 \f@V\203k \fB\202\202 \f>\211\204\202 \324\325\214~\210\326\327`\"T)\"\210G\330Z_\\\211\fZ\fU\204\240 \331 \210j\210\327y\210\2021 .\317\211\223\207" [end start indent-offset py-indent-offset ci indent-base beginning-of-line point-marker prefix-numeric-value (-1) 0 looking-at "[ 	\n]" py-compute-indentation t nil current-indentation 35 "[ 	]*$" py-continuation-line-p error "Bad indentation in region, at line %d" count-lines 1 2 delete-horizontal-space base-shifted-by target-column indents] 7 (#$ . 68980) "*r\nP"])
#@67 Like `comment-region' but uses double hash (`#') comment starter.
(defalias 'py-comment-region #[(beg end &optional arg) "\305\n\f#)\207" [py-block-comment-prefix comment-start beg end arg comment-region] 4 (#$ . 71336) "r\nP"])
#@275 Go to the start of the COUNTth preceding Python statement.
By default, goes to the previous statement.  If there is no such
statement, goes to the first statement.  Return count of statements
left to move.  `Statements' do not include blank, comment, or
continuation lines.
(defalias 'py-previous-statement #[(count) "\302W\203 \303[!\207\304 \210\305`\211\203. \302V\203. \306\307y!\203. \310 \203. S\202 \302V\2037 	b\210)\207" [count start 0 py-next-statement py-goto-initial-line nil zerop -1 py-goto-statement-at-or-above] 2 (#$ . 71575) "p"])
#@310 Go to the start of next Python statement.
If the statement at point is the i'th Python statement, goes to the
start of statement i+COUNT.  If there is no such statement, goes to the
last statement.  Returns count of statements left to move.  `Statements'
do not include blank, comment, or continuation lines.
(defalias 'py-next-statement #[(count) "\302W\203 \303[!\207\304 \210\305`\211\203' \302V\203' \306 \203' S\202 \302V\2030 	b\210)\207" [count start 0 py-previous-statement beginning-of-line nil py-goto-statement-below] 2 (#$ . 72142) "p"])
#@474 Move up to start of current block.
Go to the statement that starts the smallest enclosing block; roughly
speaking, this will be the closest preceding statement that ends with a
colon and is indented less than the statement you started on.  If
successful, also sets the mark to the starting point.

`\[py-mark-block]' can be used afterward to mark the whole code
block, if desired.

If called from a program, the mark will not be set if optional argument
NOMARK is not nil.
(defalias 'py-goto-block-up #[(&optional nomark) "`\304\211\305 \210\306\307!\203 \310 \210\311 \312 \313!\203! eb\210	\204B o\204B \314\315\304\316#\205= \305 \210\312 W\205= \311 \211\203% 	\203S \204N \317\n!\210\320 \202Y \nb\210\321\322!+\207" [initial-indent found start nomark nil py-goto-initial-line looking-at "[ 	]*\\($\\|#[^ 	\n]\\)" py-goto-statement-at-or-above py-statement-opens-block-p current-indentation zerop re-search-backward ":[ 	]*\\($\\|[#\\]\\)" move push-mark back-to-indentation error "Enclosing block not found"] 5 (#$ . 72710) nil])
#@1007 Move point to start of `def' or `class'.

Searches back for the closest preceding `def'.  If you supply a prefix
arg, looks for a `class' instead.  The docs below assume the `def'
case; just substitute `class' for `def' for the other case.
Programmatically, if CLASS is `either', then moves to either `class'
or `def'.

When second optional argument is given programmatically, move to the
COUNTth start of `def'.

If point is in a `def' statement already, and after the `d', simply
moves point to the start of the statement.

Otherwise (i.e. when point is not in a `def' statement, or at or
before the `d' of a `def' statement), searches for the closest
preceding `def' statement, and leaves point at its start.  If no such
statement can be found, leaves point at the start of the buffer.

Returns t iff a `def' statement is found by these rules.

Note that doing this command repeatedly will take you closer to the
start of the buffer each time.

To mark the current `def', see `\[py-mark-def-or-class]'.
(defalias 'py-beginning-of-def-or-class #[(&optional class count) "\206 \306i\307 X\310`	\310=\203 \311 \210\202u 	\312=\203& \313\210\202u 	\314=\2033 \315\316!\210\202u 	\317=\203@ \320\316!\210\202u 	\321=\203L \322 \210\202u 	\323=\203X \324 \210\202u 	\325=\203d \326 \210\202u 	\327=\203p \330 \210\202u \331\332	\"\210`\nb\210*b\327`	\310=\203\213 \311 \210\202\346 	\312=\203\227 \313\210\202\346 	\314=\203\244 \315\316!\210\202\346 	\317=\203\261 \320\316!\210\202\346 	\321=\203\275 \322 \210\202\346 	\323=\203\311 \324 \210\202\346 	\325=\203\325 \326 \210\202\346 	\327=\203\341 \330 \210\202\346 \331\332	\"\210`\nb\210*b\316=\203\366 \333\202\377 \203\376 \334\202\377 \335#$\336W\203#U\203$\204\313\210\336V\203/\337i!\203/\340\f!\203/\313\210\341\f\313\342$\205;\336\224b,\207" [count position here class start-re start-of-stmt 1 current-indentation bol beginning-of-line eol nil bod py-beginning-of-def-or-class either eod py-end-of-def-or-class bob beginning-of-buffer eob end-of-buffer boi back-to-indentation bos py-goto-initial-line error "Unknown buffer position requested: %s" "^[ 	]*\\(class\\|def\\)\\>" "^[ 	]*class\\>" "^[ 	]*def\\>" 0 zerop looking-at re-search-backward move start-of-line at-or-before-p] 5 (#$ . 73764) "P"])
(defalias 'beginning-of-python-def-or-class 'py-beginning-of-def-or-class)
#@1090 Move point beyond end of `def' or `class' body.

By default, looks for an appropriate `def'.  If you supply a prefix
arg, looks for a `class' instead.  The docs below assume the `def'
case; just substitute `class' for `def' for the other case.
Programmatically, if CLASS is `either', then moves to either `class'
or `def'.

When second optional argument is given programmatically, move to the
COUNTth end of `def'.

If point is in a `def' statement already, this is the `def' we use.

Else, if the `def' found by `\[py-beginning-of-def-or-class]'
contains the statement you started on, that's the `def' we use.

Otherwise, we search forward for the closest following `def', and use that.

If a `def' can be found by these rules, point is moved to the start of
the line immediately following the `def' block, and the position of the
start of the `def' is returned.

Else point is moved to the end of the buffer, and nil is returned.

Note that doing this command repeatedly will take you closer to the
end of the buffer each time.

To mark the current `def', see `\[py-mark-def-or-class]'.
(defalias 'py-end-of-def-or-class #[(&optional class count) "\203 \305U\204 \306\305Z!\210\307 \210`	\310=\203 \311\202' 	\203& \312\202' \313\314\315\316\317Q!\2039 \320\202` \306	!\203M \321 \210`\fV\203M \322\202` \fb\210\323\324\317Q\325\326#\203` \320\327 \210\n\320=\203m \321 \210\330\202\204 \n\322=\203w \330\202\204 \n\314=\203\201 \325\202\204 \331\332!+\207" [count class state which start 1 py-beginning-of-def-or-class py-goto-initial-line either "\\(class\\|def\\)" "class" "def" not-found looking-at "[ 	]*" "\\>" at-beginning py-goto-beyond-block at-end re-search-forward "^[ 	]*" nil move beginning-of-line t error "Internal error in `py-end-of-def-or-class'"] 4 (#$ . 76144) "P"])
(defalias 'end-of-python-def-or-class 'py-end-of-def-or-class)
#@2319 Mark following block of lines.  With prefix arg, mark structure.
Easier to use than explain.  It sets the region to an `interesting'
block of succeeding lines.  If point is on a blank line, it goes down to
the next non-blank line.  That will be the start of the region.  The end
of the region depends on the kind of line at the start:

 - If a comment, the region will include all succeeding comment lines up
   to (but not including) the next non-comment line (if any).

 - Else if a prefix arg is given, and the line begins one of these
   structures:

     if elif else try except finally for while def class

   the region will be set to the body of the structure, including
   following blocks that `belong' to it, but excluding trailing blank
   and comment lines.  E.g., if on a `try' statement, the `try' block
   and all (if any) of the following `except' and `finally' blocks
   that belong to the `try' structure will be in the region.  Ditto
   for if/elif/else, for/else and while/else structures, and (a bit
   degenerate, since they're always one-block structures) def and
   class blocks.

 - Else if no prefix argument is given, and the line begins a Python
   block (see list above), and the block is not a `one-liner' (i.e.,
   the statement ends with a colon, not with code), the region will
   include all succeeding lines up to (but not including) the next
   code statement (if any) that's indented no more than the starting
   line, except that trailing blank and comment lines are excluded.
   E.g., if the starting line begins a multi-statement `def'
   structure, the region will be set to the full function definition,
   but without any trailing `noise' lines.

 - Else the region will include all succeeding lines up to (but not
   including) the next blank line, or code or indenting-comment line
   indented strictly less than the starting line.  Trailing indenting
   comment lines are included in this case, but not trailing blank
   lines.

A msg identifying the location of the mark is displayed in the echo
area; or do `\[exchange-point-and-mark]' to flip down to the end.

If called from a program, optional argument EXTEND plays the role of
the prefix arg, and if optional argument JUST-MOVE is not nil, just
moves to the end of the block (& does not set mark or display a msg).
(defalias 'py-mark-block #[(&optional extend just-move) "\306 \210\307\310!\203 m\204 \311y\210\202 m\203 \312\313!\210`\314 \315\316\315\211\307\317!\203= \320\321\315\322#\210\323\324!\210`\202\264 !\203~ \325 \211\203~ 	\n\236\203~ \326 \210\327y\203\264 `\211\203\264 \330 \203\264 \314 \fU\203\264 \325 \211\203\264 	\n\236A>\203\264 \202O \331 \203\230 `\211\203\264 \330 \203\264 \314 \fV\204\203 \202\264 `\211\203\264 \332 \210\307\310!\204\264 \314 \fY\204\230 \307\333!\204\230 b\210\332 \210\"?\205\320 \334`\335\"\210\327y\210\336\337\340 \"\210b.\207" [next-symbol first-symbol followers last-pos initial-indent initial-pos py-goto-initial-line looking-at "[ 	]*$" 1 error "Hit end of buffer without finding a non-blank stmt" current-indentation nil ((if elif else) (elif elif else) (else) (try except finally) (except except) (finally) (for else) (while else) (def) (class)) "[ 	]*#" re-search-forward "^[ 	]*[^ 	#]" move re-search-backward "^[ 	]*#" py-suck-up-first-keyword py-goto-beyond-block -1 py-goto-statement-below py-statement-opens-block-p py-goto-beyond-final-line "[ 	]*#[^ 	\n]" push-mark no-msg message "Mark set after: %s" py-suck-up-leading-text extend just-move] 6 (#$ . 78018) "P"])
#@1963 Set region to body of def (or class, with prefix arg) enclosing point.
Pushes the current mark, then point, on the mark ring (all language
modes do this, but although it's handy it's never documented ...).

In most Emacs language modes, this function bears at least a
hallucinogenic resemblance to `\[py-end-of-def-or-class]' and
`\[py-beginning-of-def-or-class]'.

And in earlier versions of Python mode, all 3 were tightly connected.
Turned out that was more confusing than useful: the `goto start' and
`goto end' commands are usually used to search through a file, and
people expect them to act a lot like `search backward' and `search
forward' string-search commands.  But because Python `def' and `class'
can nest to arbitrary levels, finding the smallest def containing
point cannot be done via a simple backward search: the def containing
point may not be the closest preceding def, or even the closest
preceding def that's indented less.  The fancy algorithm required is
appropriate for the usual uses of this `mark' command, but not for the
`goto' variations.

So the def marked by this command may not be the one either of the
`goto' commands find: If point is on a blank or non-indenting comment
line, moves back to start of the closest preceding code statement or
indenting comment line.  If this is a `def' statement, that's the def
we use.  Else searches for the smallest enclosing `def' block and uses
that.  Else signals an error.

When an enclosing def is found: The mark is left immediately beyond
the last line of the def block.  Point is left at the start of the
def, except that: if the def is preceded by a number of comment lines
followed by (at most) one optional blank line, point is left at the
start of the comments; else if the def is preceded by a blank line,
point is left at its start.

The intent is to mark the containing def/class and its associated
documentation, to make moving and duplicating functions and classes
pleasant.
(defalias 'py-mark-def-or-class #[(&optional class) "`\304=\203 \305\202 \203 \306\202 \307\310\n!\210\311	!\2045 \nb\210\312\313\304=\203/ \314\2020 	\"\210\202t `\315 \210\310`!\210\nb\210\316\317y!\203t \320\321!\203S `\202V \nb\210\316\317y!\203t \320\322!\203q \323\324\325\326#\203t \327y\210\202t \nb\210*\330 \210\331\303!\205\201 \332\211\207" [class which start zmacs-region-stays either "\\(class\\|def\\)" "class" "def" push-mark py-go-up-tree-to-keyword error "Enclosing %s not found" "def or class" py-goto-beyond-block zerop -1 looking-at "[ 	]*$" "[ 	]*#" re-search-backward "^[ 	]*[^ 	#]" nil move 1 exchange-point-and-mark boundp t] 4 (#$ . 81585) "P"])
#@227 Move forward to end of a nomenclature section or word.
With \[universal-argument] (programmatically, optional argument ARG), 
do it that many times.

A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores.
(defalias 'py-forward-into-nomenclature #[(&optional arg) "\303	\304V\203 \305\306d\307	$\210\202* 	\304W\203* \310\311e\304#\203* \312u\210	T\211\202 )\313\302!\2054 \307\211\207" [case-fold-search arg zmacs-region-stays nil 0 re-search-forward "\\(\\W\\|[_]\\)*\\([A-Z]*[a-z0-9]*\\)" t re-search-backward "\\(\\W\\|[a-z0-9]\\)[A-Z]+\\|\\(\\W\\|[_]\\)\\w+" 1 boundp] 6 (#$ . 84238) "p"])
#@216 Move backward to beginning of a nomenclature section or word.
With optional ARG, move that many times.  If ARG is negative, move
forward.

A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores.
(defalias 'py-backward-into-nomenclature #[(&optional arg) "\302[!\210\303\301!\205 \304\211\207" [arg zmacs-region-stays py-forward-into-nomenclature boundp t] 2 (#$ . 84865) "p"])
(defalias 'py-pdbtrack-toggle-stack-tracking #[(arg) "\302p!\204 \303\304p\"\210\203 \305\306!\211!\203 	?\202# \307V\310\311	\203- \312\202. \313\"\207" [arg py-pdbtrack-do-tracking-p get-buffer-process error "No process associated with buffer '%s'" zerop prefix-numeric-value 0 message "%sabled Python's pdbtrack" "En" "Dis"] 3 nil "P"])
(defalias 'turn-on-pdbtrack #[nil "\300\301!\207" [py-pdbtrack-toggle-stack-tracking 1] 2 nil nil])
(defalias 'turn-off-pdbtrack #[nil "\300\301!\207" [py-pdbtrack-toggle-stack-tracking 0] 2 nil nil])
#@57 *Run pychecker (default on the file currently visited).
(defalias 'py-pychecker-run #[(command) "\302?\303\"\210\304	\305\"\207" [py-ask-about-save command save-some-buffers nil compile-internal "No more errors"] 3 (#$ . -85821) (let ((default (format "%s %s %s" py-pychecker-command (mapconcat 'identity py-pychecker-command-args " ") (buffer-file-name))) (last (when py-pychecker-history (let* ((lastcmd (car py-pychecker-history)) (cmd (cdr (reverse (split-string lastcmd)))) (newcmd (reverse (cons (buffer-file-name) cmd)))) (mapconcat 'identity newcmd " "))))) (list (if (fboundp 'read-shell-command) (read-shell-command "Run pychecker like this: " (if last last default) 'py-pychecker-history) (read-string "Run pychecker like this: " (if last last default) 'py-pychecker-history))))])
#@53 Return the first textual item to the nearest point.
(defalias 'py-symbol-near-point #[nil "\212\303 p\304\216\305\n!\210o\204 `Sfz\306>\204% \307\310!\204% \311u\210\202 \307\312!\2031 \311u\210\202% \313\312\314\315#\205O \311u\210`\316\317!\210\307\320!\203M \311u\210\202A `{,\207" [#1=#:buffer #2=#:table py-dotted-expression-syntax-table syntax-table ((byte-code "rq\210\302	!\210)\302\207" [#1# #2# set-syntax-table] 2)) set-syntax-table (119 95) looking-at "\\sw\\|\\s_\\|\\'" 1 "\\sw\\|\\s_" re-search-backward nil t forward-sexp -1 "\\s'"] 4 (#$ . 86620)])
#@57 Get help from Python based on the symbol nearest point.
(defalias 'py-help-at-point #[nil "\303 \211\304\305\306\307\310$\206 \304O\311	\312\232\204 \313	\314Q\315\n\316\317\320\321\260\322\n!\210\323\n!\210\324q\210\325 +\207" [sym base cmd py-symbol-near-point 0 search "." :from-end t nil "" "import " "\n" "import pydoc\n" "try: pydoc.help('" "')\n" "except: print 'No help available on:', \"" "\"" message py-execute-string "*Python Output*" help-mode] 9 (#$ . 87197) nil])
(defalias 'py-dump-help-string #[(str) "\306\220\307 \310\211\211\211\311\310\211\211()*\312\313+#\203\265 \311\224\311\225+\314\224\314\225O)+\315\224\315\225O(\316(!\317\320+\nO!!\210)\321\232\203b \322!\323\324\325\326,\"\327#P\202\224 )\330\232\203\216 \331\332\"*\236\203\204 \333\334J!\335\334\336!!R\202\212 \337\334J!P\202\224 \340\341)\"\210\317\342\343)\321\232\203\242 \344\202\243 \345($!\210\317\f!\210\346 \210	\202 \317\320+\310O!!\210.	\347 \221\207" [keys end mstart start funcdoc func "*Help*" buffer-local-variables nil 0 string-match "^%\\([vc]\\):\\(.+\\)\n" 1 2 intern princ substitute-command-keys "c" documentation "Key(s): " mapconcat key-description where-is-internal ", " "v" documentation-property variable-documentation "Local/Global values: " prin1-to-string " / " default-value "Value: " error "Error in py-dump-help-string, tag `%s'" format "\n-> %s:	%s	%s\n\n" "Command" "Variable" terpri print-help-return-message funcname funckind locals str py-mode-map] 10])
#@37 Dump long form of Python-mode docs.
(defalias 'py-describe-mode #[nil "\300\301!\207" [py-dump-help-string "Major mode for editing Python files.\nKnows about Python indentation, tokens, comments and continuation lines.\nParagraphs are separated by blank lines only.\n\nMajor sections below begin with the string `@'; specific function and\nvariable docs begin with `->'.\n\n@EXECUTING PYTHON CODE\n\n\\[py-execute-import-or-reload]	imports or reloads the file in the Python interpreter\n\\[py-execute-buffer]	sends the entire buffer to the Python interpreter\n\\[py-execute-region]	sends the current region\n\\[py-execute-def-or-class]	sends the current function or class definition\n\\[py-execute-string]	sends an arbitrary string\n\\[py-shell]	starts a Python interpreter window; this will be used by\n	subsequent Python execution commands\n%c:py-execute-import-or-reload\n%c:py-execute-buffer\n%c:py-execute-region\n%c:py-execute-def-or-class\n%c:py-execute-string\n%c:py-shell\n\n@VARIABLES\n\npy-indent-offset	indentation increment\npy-block-comment-prefix	comment string used by comment-region\n\npy-python-command	shell command to invoke Python interpreter\npy-temp-directory	directory used for temp files (if needed)\n\npy-beep-if-tab-change	ring the bell if tab-width is changed\n%v:py-indent-offset\n%v:py-block-comment-prefix\n%v:py-python-command\n%v:py-temp-directory\n%v:py-beep-if-tab-change\n\n@KINDS OF LINES\n\nEach physical line in the file is either a `continuation line' (the\npreceding line ends with a backslash that's not part of a comment, or\nthe paren/bracket/brace nesting level at the start of the line is\nnon-zero, or both) or an `initial line' (everything else).\n\nAn initial line is in turn a `blank line' (contains nothing except\npossibly blanks or tabs), a `comment line' (leftmost non-blank\ncharacter is `#'), or a `code line' (everything else).\n\nComment Lines\n\nAlthough all comment lines are treated alike by Python, Python mode\nrecognizes two kinds that act differently with respect to indentation.\n\nAn `indenting comment line' is a comment line with a blank, tab or\nnothing after the initial `#'.  The indentation commands (see below)\ntreat these exactly as if they were code lines: a line following an\nindenting comment line will be indented like the comment line.  All\nother comment lines (those with a non-whitespace character immediately\nfollowing the initial `#') are `non-indenting comment lines', and\ntheir indentation is ignored by the indentation commands.\n\nIndenting comment lines are by far the usual case, and should be used\nwhenever possible.  Non-indenting comment lines are useful in cases\nlike these:\n\n	a = b   # a very wordy single-line comment that ends up being\n	        #... continued onto another line\n\n	if a == b:\n##		print 'panic!' # old code we've `commented out'\n		return a\n\nSince the `#...' and `##' comment lines have a non-whitespace\ncharacter following the initial `#', Python mode ignores them when\ncomputing the proper indentation for the next line.\n\nContinuation Lines and Statements\n\nThe Python-mode commands generally work on statements instead of on\nindividual lines, where a `statement' is a comment or blank line, or a\ncode line and all of its following continuation lines (if any)\nconsidered as a single logical unit.  The commands in this mode\ngenerally (when it makes sense) automatically move to the start of the\nstatement containing point, even if point happens to be in the middle\nof some continuation line.\n\n\n@INDENTATION\n\nPrimarily for entering new code:\n	\\[indent-for-tab-command]	 indent line appropriately\n	\\[py-newline-and-indent]	 insert newline, then indent\n	\\[py-electric-backspace]	 reduce indentation, or delete single character\n\nPrimarily for reindenting existing code:\n	\\[py-guess-indent-offset]	 guess py-indent-offset from file content; change locally\n	\\[universal-argument] \\[py-guess-indent-offset]	 ditto, but change globally\n\n	\\[py-indent-region]	 reindent region to match its context\n	\\[py-shift-region-left]	 shift region left by py-indent-offset\n	\\[py-shift-region-right]	 shift region right by py-indent-offset\n\nUnlike most programming languages, Python uses indentation, and only\nindentation, to specify block structure.  Hence the indentation supplied\nautomatically by Python-mode is just an educated guess:  only you know\nthe block structure you intend, so only you can supply correct\nindentation.\n\nThe \\[indent-for-tab-command] and \\[py-newline-and-indent] keys try to suggest plausible indentation, based on\nthe indentation of preceding statements.  E.g., assuming\npy-indent-offset is 4, after you enter\n	if a > 0: \\[py-newline-and-indent]\nthe cursor will be moved to the position of the `_' (_ is not a\ncharacter in the file, it's just used here to indicate the location of\nthe cursor):\n	if a > 0:\n	    _\nIf you then enter `c = d' \\[py-newline-and-indent], the cursor will move\nto\n	if a > 0:\n	    c = d\n	    _\nPython-mode cannot know whether that's what you intended, or whether\n	if a > 0:\n	    c = d\n	_\nwas your intent.  In general, Python-mode either reproduces the\nindentation of the (closest code or indenting-comment) preceding\nstatement, or adds an extra py-indent-offset blanks if the preceding\nstatement has `:' as its last significant (non-whitespace and non-\ncomment) character.  If the suggested indentation is too much, use\n\\[py-electric-backspace] to reduce it.\n\nContinuation lines are given extra indentation.  If you don't like the\nsuggested indentation, change it to something you do like, and Python-\nmode will strive to indent later lines of the statement in the same way.\n\nIf a line is a continuation line by virtue of being in an unclosed\nparen/bracket/brace structure (`list', for short), the suggested\nindentation depends on whether the current line contains the first item\nin the list.  If it does, it's indented py-indent-offset columns beyond\nthe indentation of the line containing the open bracket.  If you don't\nlike that, change it by hand.  The remaining items in the list will mimic\nwhatever indentation you give to the first item.\n\nIf a line is a continuation line because the line preceding it ends with\na backslash, the third and following lines of the statement inherit their\nindentation from the line preceding them.  The indentation of the second\nline in the statement depends on the form of the first (base) line:  if\nthe base line is an assignment statement with anything more interesting\nthan the backslash following the leftmost assigning `=', the second line\nis indented two columns beyond that `='.  Else it's indented to two\ncolumns beyond the leftmost solid chunk of non-whitespace characters on\nthe base line.\n\nWarning:  indent-region should not normally be used!  It calls \\[indent-for-tab-command]\nrepeatedly, and as explained above, \\[indent-for-tab-command] can't guess the block\nstructure you intend.\n%c:indent-for-tab-command\n%c:py-newline-and-indent\n%c:py-electric-backspace\n\n\nThe next function may be handy when editing code you didn't write:\n%c:py-guess-indent-offset\n\n\nThe remaining `indent' functions apply to a region of Python code.  They\nassume the block structure (equals indentation, in Python) of the region\nis correct, and alter the indentation in various ways while preserving\nthe block structure:\n%c:py-indent-region\n%c:py-shift-region-left\n%c:py-shift-region-right\n\n@MARKING & MANIPULATING REGIONS OF CODE\n\n\\[py-mark-block]	 mark block of lines\n\\[py-mark-def-or-class]	 mark smallest enclosing def\n\\[universal-argument] \\[py-mark-def-or-class]	 mark smallest enclosing class\n\\[comment-region]	 comment out region of code\n\\[universal-argument] \\[comment-region]	 uncomment region of code\n%c:py-mark-block\n%c:py-mark-def-or-class\n%c:comment-region\n\n@MOVING POINT\n\n\\[py-previous-statement]	 move to statement preceding point\n\\[py-next-statement]	 move to statement following point\n\\[py-goto-block-up]	 move up to start of current block\n\\[py-beginning-of-def-or-class]	 move to start of def\n\\[universal-argument] \\[py-beginning-of-def-or-class]	 move to start of class\n\\[py-end-of-def-or-class]	 move to end of def\n\\[universal-argument] \\[py-end-of-def-or-class]	 move to end of class\n\nThe first two move to one statement beyond the statement that contains\npoint.  A numeric prefix argument tells them to move that many\nstatements instead.  Blank lines, comment lines, and continuation lines\ndo not count as `statements' for these commands.  So, e.g., you can go\nto the first code statement in a file by entering\n	\\[beginning-of-buffer]	 to move to the top of the file\n	\\[py-next-statement]	 to skip over initial comments and blank lines\nOr do `\\[py-previous-statement]' with a huge prefix argument.\n%c:py-previous-statement\n%c:py-next-statement\n%c:py-goto-block-up\n%c:py-beginning-of-def-or-class\n%c:py-end-of-def-or-class\n\n@LITTLE-KNOWN EMACS COMMANDS PARTICULARLY USEFUL IN PYTHON MODE\n\n`\\[indent-new-comment-line]' is handy for entering a multi-line comment.\n\n`\\[set-selective-display]' with a `small' prefix arg is ideally suited for viewing the\noverall class and def structure of a module.\n\n`\\[back-to-indentation]' moves point to a line's first non-blank character.\n\n`\\[indent-relative]' is handy for creating odd indentation.\n\n@OTHER EMACS HINTS\n\nIf you don't like the default value of a variable, change its value to\nwhatever you do like by putting a `setq' line in your .emacs file.\nE.g., to set the indentation increment to 4, put this line in your\n.emacs:\n	(setq  py-indent-offset  4)\nTo see the value of a variable, do `\\[describe-variable]' and enter the variable\nname at the prompt.\n\nWhen entering a key sequence like `C-c C-n', it is not necessary to\nrelease the CONTROL key after doing the `C-c' part -- it suffices to\npress the CONTROL key, press and release `c' (while still holding down\nCONTROL), press and release `n' (while still holding down CONTROL), &\nthen release CONTROL.\n\nEntering Python mode calls with no arguments the value of the variable\n`python-mode-hook', if that value exists and is not nil; for backward\ncompatibility it also tries `py-mode-hook'; see the `Hooks' section of\nthe Elisp manual for details.\n\nObscure:  When python-mode is first loaded, it looks for all bindings\nto newline-and-indent in the global keymap, and shadows them with\nlocal bindings to py-newline-and-indent."] 2 (#$ . 88732) nil])
(byte-code "\301\302!\210\303\304!\203 \304\305\306\307\310\311\312&\210\313B\314\313!\204# \315\313\316\"\210\301\207" [current-load-list require info-look fboundp info-lookup-maybe-add-help :mode python-mode :regexp "[a-zA-Z0-9_]+" :doc-spec (("(python-lib)Module Index") ("(python-lib)Class-Exception-Object Index") ("(python-lib)Function-Method-Variable Index") ("(python-lib)Miscellaneous Index")) py-parse-state-re default-boundp set-default "^[ 	]*\\(elif\\|else\\|while\\|def\\|class\\)\\>\\|^[^ #	\n]"] 7)
#@66 Return the parse state at point (see `parse-partial-sexp' docs).
(defalias 'py-parse-state #[nil "\212`\304\211\204. \305\304\306#\210\307 \210\212\310`\n\")\311	8?\206# o\211\204 eb\210\202 	,\207" [done pps here py-parse-state-re nil re-search-backward move beginning-of-line parse-partial-sexp 3] 5 (#$ . 99814)])
#@103 Return the buffer position of the last unclosed enclosing list.
If nesting level is zero, return nil.
(defalias 'py-nesting-level #[nil "\301 \302@!?\205 A@)\207" [status py-parse-state zerop] 2 (#$ . 100147)])
#@75 Return t iff preceding line ends with backslash that is not in a comment.
(defalias 'py-backslash-continuation-line-p #[nil "\212\301 \210`\302Zf\303=\205 \304y\205 \305!)\207" [py-continued-re beginning-of-line 2 92 -1 looking-at] 2 (#$ . 100368)])
#@51 Return t iff current line is a continuation line.
(defalias 'py-continuation-line-p #[nil "\212\300 \210\301 \206 \302 )\207" [beginning-of-line py-backslash-continuation-line-p py-nesting-level] 1 (#$ . 100627)])
#@146 Go to the beginning of the triple quoted string we find ourselves in.
DELIM is the TQS string delimiter character we're searching backwards
for.
(defalias 'py-goto-beginning-of-tqs #[(delim) "\205 \303\304\"\305\211\205C \212	\203( \306\307\310\217\210o?\205# `Sf\311U\211\204 `SfU\203> `SSfU\203> \303\312\")\306\313\314\217*\207" [delim continue skip make-string 1 t nil (search-backward skip) ((error)) 92 3 (search-backward skip) ((error))] 4 (#$ . 100849)])
#@202 Go to the initial line of the current statement.
Usually this is the line we're on, but if we're on the 2nd or
following lines of a continuation block, we need to go up to the first
line of the block.
(defalias 'py-goto-initial-line #[nil "\301\302 \203' \303 \210\304 \203 \304 \203 \305y\210\202 \306 \211\203 b\210\202 )\303 \207" [open-bracket-pos nil py-continuation-line-p beginning-of-line py-backslash-continuation-line-p -1 py-nesting-level] 2 (#$ . 101330)])
#@196 Go to the point just beyond the fine line of the current statement.
Usually this is the start of the next line, but if this is a
multi-line statement we need to skip over the continuation lines.
(defalias 'py-goto-beyond-final-line #[nil "\302\303\304Q!\203 \305\225b\210\306y\210\307\310 \205G m?\205G \311 \203+ m\204+ \306y\210\202 \312 \313	@!\204 m\204 \314`d\305\307	%\210\306y\210\202 )\207" [py-stringlit-re state looking-at "[ 	]*\\(" "\\)" 0 1 nil py-continuation-line-p py-backslash-continuation-line-p py-parse-state zerop parse-partial-sexp] 6 (#$ . 101814)])
#@155 Return t iff the current statement opens a block.
I.e., iff it ends with a colon that is not in a comment.  Point should 
be at the start of a statement.
(defalias 'py-statement-opens-block-p #[nil "\212`\305 \210`S\306\307\211\211b\210\n\203: \310\311\306#\2034 `=\203 \307\312\f\313\224\"\3148?\202 \307\211\204 	.\207" [state answer searching finish start py-goto-beyond-final-line t nil re-search-forward ":\\([ 	]\\|\\\\\n\\)*\\(#.*\\)?$" parse-partial-sexp 0 4] 6 (#$ . 102402)])
#@175 Return t iff the current statement closes a block.
I.e., if the line starts with `return', `raise', `break', `continue',
and `pass'.  This doesn't catch embedded statements.
(defalias 'py-statement-closes-block-p #[nil "`\302 \210\303 \210\304	\305P!b\210)\207" [here py-block-closing-keywords-re py-goto-initial-line back-to-indentation looking-at "\\>"] 3 (#$ . 102911)])
#@255 Go to point just beyond the final line of block begun by the current line.
This is the same as where `py-goto-beyond-final-line' goes unless
we're on colon line, in which case we go to the end of the block.
Assumes point is at the beginning of the line.
(defalias 'py-goto-beyond-block #[nil "\300 \203\n \301\302\303\"\207\304 \207" [py-statement-opens-block-p py-mark-block nil just-move py-goto-beyond-final-line] 3 (#$ . 103294)])
#@193 Go to the start of the first statement at or preceding point.
Return t if there is such a statement, otherwise nil.  `Statement'
does not include blank lines, comments, or continuation lines.
(defalias 'py-goto-statement-at-or-above #[nil "\301 \210\302!\203 \303\304\305\306#\205 \301 \210\306\207\306\207" [py-blank-or-comment-re py-goto-initial-line looking-at re-search-backward "^[ 	]*[^ 	#\n]" nil t] 4 (#$ . 103736)])
#@208 Go to start of the first statement following the statement containing point.
Return t if there is such a statement, otherwise nil.  `Statement'
does not include blank lines, comments, or continuation lines.
(defalias 'py-goto-statement-below #[nil "\302 \210`\303 \210\304	!\204 \305 \203 m\204 \306y\210\202 m\203( b\210\307\202) \310)\207" [start py-blank-or-comment-re beginning-of-line py-goto-beyond-final-line looking-at py-in-literal 1 nil t] 2 (#$ . 104171)])
#@422 Go to begining of statement starting with KEY, at or preceding point.

KEY is a regular expression describing a Python keyword.  Skip blank
lines and non-indenting comments.  If the statement found starts with
KEY, then stop, otherwise go back to first enclosing block starting
with KEY.  If successful, leave point at the start of the KEY line and 
return t.  Otherwise, leav point at an undefined place and return nil.
(defalias 'py-go-up-tree-to-keyword #[(key) "\305 \210\306\307!\203 \310\311y!\204 \305 \210\312\313Q\314\306	!\314\2049 \f\2049 \314\315\316\217\210\f\204  \306	!\211\203$ \317 \210,\207" [key re case-fold-search found dead py-goto-initial-line looking-at "[ 	]*\\($\\|#[^ 	\n]\\)" zerop -1 "[ 	]*" "\\b" nil (byte-code "\300\301!\207" [py-goto-block-up no-mark] 2) ((error (byte-code "\301\211\207" [dead t] 2))) beginning-of-line] 4 (#$ . 104652)])
#@120 Return string in buffer from start of indentation to end of line.
Prefix with "..." if leading whitespace was skipped.
(defalias 'py-suck-up-leading-text #[nil "\212\300 \210n\203\f \301\202 \302`\303\210`{P)\207" [back-to-indentation "" "..." nil] 3 (#$ . 105543)])
#@155 Return first keyword on the line as a Lisp symbol.
`Keyword' is defined (essentially) as the regular expression
([a-z]+).  Returns nil if none was found.
(defalias 'py-suck-up-first-keyword #[nil "\301\302\303!\205 \304\305\224\305\225{!)\207" [case-fold-search nil looking-at "[ 	]*\\([a-z]+\\)\\b" intern 1] 3 (#$ . 105819)])
#@124 Python value for `add-log-current-defun-function'.
This tells add-log.el how to find the current function/method/variable.
(defalias 'py-current-defun #[nil "\212\306 \210\307 \210\310!\204 \311 \203 o\204 \312\313!\210\202 \306 \210\314\211\315\211\310\316!\2038 \313\224\313\225{\317\320\n\204o \321\322!\203e \310\323!\203e \324\224\324\225{	\203] \310\325!\203] \202d \fQ\320)\315\211\326\327\217\210\2028 \f\314\230?\205w \f-\207" [py-blank-or-comment-re assignment dead sep scopes name py-goto-initial-line back-to-indentation looking-at py-in-literal backward-to-indentation 1 "" nil "[ 	]*\\([a-zA-Z0-9_]+\\)[ 	]*=" t "." py-go-up-tree-to-keyword "\\(class\\|def\\)" "[ 	]*\\(class\\|def\\)[ 	]*\\([a-zA-Z0-9_]+\\)[ 	]*" 2 "[ 	]*def" (byte-code "\300\301!\207" [py-goto-block-up no-mark] 2) ((error (byte-code "\301\211\207" [dead t] 2)))] 5 (#$ . 106156)])
#@46 Address accepting submission of bug reports.
(defconst py-help-address "python-mode@python.org" (#$ . 107049))
#@62 Echo the current version of `python-mode' in the minibuffer.
(defalias 'py-version #[nil "\302\303\"\210\304\301!\205 \305\211\207" [py-version zmacs-region-stays message "Using `python-mode' version %s" boundp t] 3 (#$ . 107166) nil])
#@162 Submit via mail a bug report on `python-mode'.
With \[universal-argument] (programmatically, argument ENHANCEMENT-P
non-nil) just submit an enhancement request.
(defalias 'py-submit-bug-report #[(enhancement-p) "\203 \305\202	 \306\307\310!\210\311\n\312P?\205 \313\314\211\315&\210?\2057 \316`!\210\317c\210\320 \210\321\304!\2057 \306\211)\207" [enhancement-p reporter-prompt-for-summary-p py-help-address py-version zmacs-region-stays "(Very) brief summary: " t require reporter reporter-submit-bug-report "python-mode " (py-python-command py-indent-offset py-block-comment-prefix py-temp-directory py-beep-if-tab-change) nil "Dear Barry," set-mark "Please replace this text with a sufficiently large code sample\nand an exact recipe so that I can reproduce your problem.  Failure\nto do so may mean a greater delay in fixing your bug.\n\n" exchange-point-and-mark boundp] 7 (#$ . 107412) (list (not (y-or-n-p "Is this a bug report (hit `n' to send other comments)? ")))])
#@87 Delete files in `py-file-queue'.
These are Python temporary files awaiting execution.
(defalias 'py-kill-emacs-hook #[nil "\301\302\"\207" [py-file-queue mapcar #[(filename) "\300\301\302\217\207" [nil (delete-file filename) ((error))] 3]] 3 (#$ . 108403)])
(byte-code "\301\302\303\"\210\301\304\305\"\210\306\236\204 \307B\301\207" [minor-mode-alist add-hook kill-emacs-hook py-kill-emacs-hook comint-output-filter-functions py-pdbtrack-track-stack-file py-pdbtrack-minor-mode-string (py-pdbtrack-is-tracking-p py-pdbtrack-minor-mode-string)] 3)
#@41 Fill the comment paragraph around point
(defalias 'py-fill-comment #[(&optional justify) "\306\211\212\307 \210\310\311!\203 \312\313\224\313\225{\202Q \310\314!\204> \315\306w\210`f\316=\2030 \317u\210\202 `f\320>\203 \321\322!\210\202 \310\323!\203Q \312\324i\325\"\313\224\313\225{P)	\204] \326\n!\210\202\224 \214\212\327\330y!\203l \310\331!\204_ \310\331!\204u \322y\210`)\212\322y\210\310\331!\204x `)}\210\332P\f\332P\326\n!\210,*\312\207" [comment-fill-prefix has-comment justify paragraph-start paragraph-separate fill-prefix nil beginning-of-line looking-at "[ 	]*#[# 	]*" t 0 "#\\|$" "^#\n\"'\\" 92 2 (34 39) forward-sexp 1 "#+[	 ]*" make-string 32 fill-paragraph zerop -1 "^[ 	]*#" "\\|[ 	#]*$"] 3 (#$ . 108962)])
#@67 Fill the paragraph around (point) in the string starting at start
(defalias 'py-fill-string #[(start &optional justify) "\306\211\211\211\212\fb\210\307\310!\203% \311\225\312\225\312\224Z\313\312\224\312\225\"\202) \314\315!\210\212\316 \210Sf\317U\204? \307\320P!\203? `)\321	\322U\203K \323\202L \312!\210`S)\214\n}\210dSf\317U\324!\210\204w dSf\317U\203w \212db\210\325\326!\210).\327\207" [delim delim-length string-end string-start start ends-with-newline nil looking-at "\\('''\\|\"\"\"\\|'\\|\"\\)\\\\?\n?" 0 1 buffer-substring-no-properties error "The parameter start is not the beginning of a python string" beginning-of-line 10 "[ 	]*" forward-sexp 3 2 fill-paragraph delete-char -1 t justify] 4 (#$ . 109710)])
#@281 Like \[fill-paragraph], but handle Python comments and strings.
If any of the current line is a comment, fill the comment or the
paragraph of it that point is in, preserving the comment's indentation
and initial `#'s.
If point is inside a string, narrow to that string and fill.

(defalias 'py-fill-paragraph #[(&optional justify) "\302`\305=\203 \306 \210\202k \307=\203 \310\210\202k \302=\203) \311\312!\210\202k \313=\2036 \314\312!\210\202k \315=\203B \316 \210\202k \317=\203N \320 \210\202k \321=\203Z \322 \210\202k \323=\203f \324 \210\202k \325\326\"\210`	b\210*\327\n`\"\3308\204\207 \212\306 \210\331\332!)\203\215 \333\f!\202\244\3348\203\233 \335\3368!\202\244\212\337v\210\340 )\341=\203\212\335\321`\305=\203\271 \306 \210\202\307=\203\305 \310\210\202\302=\203\322 \311\312!\210\202\313=\203\337 \314\312!\210\202\315=\203\353 \316 \210\202\317=\203\367 \320 \210\202\321=\203\322 \210\202\323=\203\324 \210\202\325\326\"\210`	b\210*!)\202\244\212\342v\210\340 )\341=\203\241\212\335\321`\305=\203<\306 \210\202\227\307=\203H\310\210\202\227\302=\203U\311\312!\210\202\227\313=\203b\314\312!\210\202\227\315=\203n\316 \210\202\227\317=\203z\320 \210\202\227\321=\203\206\322 \210\202\227\323=\203\222\324 \210\202\227\325\326\"\210`	b\210*!)\202\244\343\f!*\207" [position here bod pps justify bol beginning-of-line eol nil py-beginning-of-def-or-class either eod py-end-of-def-or-class bob beginning-of-buffer eob end-of-buffer boi back-to-indentation bos py-goto-initial-line error "Unknown buffer position requested: %s" parse-partial-sexp 4 looking-at "[ 	]*#" py-fill-comment 3 py-fill-string 8 1 py-in-literal string -1 fill-paragraph] 4 (#$ . 110457) "P"])
(provide 'python-mode)
