-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-mode.elc
More file actions
executable file
·1055 lines (937 loc) · 111 KB
/
Copy pathpython-mode.elc
File metadata and controls
executable file
·1055 lines (937 loc) · 111 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;ELC
;;; Compiled by Administrator@ALTU on Mon May 19 20:17:09 2008
;;; from file c:/emacs/python-mode.el
;;; in Emacs version 23.0.0.1
;;; 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.75 $" (#$ . 570))
(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\306\307\310\311\312\313\314\315&\207" [require comint custom cl compile ansi-color custom-declare-group python nil "Support for the Python programming language, <http://www.python.org/>" :group languages :prefix "py-"] 8)
#@147 *Non-nil means TAB in Python mode should always reindent the current line,
regardless of where in the line point is when the TAB command is used.
(custom-declare-variable 'py-tab-always-indent 't '(#$ . -961) :type 'boolean :group 'python)
#@50 *Shell command used to start Python interpreter.
(custom-declare-variable 'py-python-command '"python" '(#$ . -1207) :type 'string :group 'python)
(make-obsolete-variable 'py-jpython-command 'py-jython-command)
#@54 *Shell command used to start the Jython interpreter.
(custom-declare-variable 'py-jython-command '"jython" '(#$ . -1424) :type 'string :group 'python :tag "Jython Command")
#@617 *Which Python interpreter is used by default.
The value for this variable can be either `cpython' or `jython'.
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 `jython', the variables `py-jython-command' and
`py-jython-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 '(#$ . -1604) :type '(choice (const :tag "Python (a.k.a. CPython)" cpython) (const :tag "Jython" jython)) :group 'python)
#@68 *List of string arguments to be used when starting a Python shell.
(custom-declare-variable 'py-python-command-args ''("-i") '(#$ . -2407) :type '(repeat string) :group 'python)
(make-obsolete-variable 'py-jpython-command-args 'py-jython-command-args)
#@68 *List of string arguments to be used when starting a Jython shell.
(custom-declare-variable 'py-jython-command-args ''("-i") '(#$ . -2665) :type '(repeat string) :group 'python :tag "Jython 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 '(#$ . -2877) :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 '(#$ . -3126) :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 '(#$ . -3468) :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 '(#$ . -4527) :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 '"##" '(#$ . -4959) :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 '(#$ . -5410) :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'"))) '(#$ . -6396) :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 '(#$ . -7058) :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 '(#$ . -7580) :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 '(#$ . 7924) :type 'boolean :group 'python)
#@70 *Function called by `py-electric-backspace' when deleting backwards.
(custom-declare-variable 'py-backspace-function ''backward-delete-char-untabify '(#$ . -8151) :type 'function :group 'python)
#@66 *Function called by `py-electric-delete' when deleting forwards.
(custom-declare-variable 'py-delete-function ''delete-char '(#$ . -8352) :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 '(#$ . -8529) :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 '(#$ . -8799) :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" '(#$ . -9341) :type 'string :group 'python)
#@326 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 Jython 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 '(#$ . 9520) :type 'integer :group 'python)
(make-obsolete-variable 'py-jpython-packages 'py-jython-packages)
#@45 Imported packages that imply `jython-mode'.
(custom-declare-variable 'py-jython-packages ''("java" "javax" "org" "com") '(#$ . 10020) :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 (#$ . 10200))
(make-variable-buffer-local 'py-master-file)
#@39 *Shell command used to run Pychecker.
(custom-declare-variable 'py-pychecker-command '"pychecker" '(#$ . -10769) :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") '(#$ . -10943) :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 '(("jython" quote jython) ("python" quote cpython)) (#$ . -11154))
#@63 *A regular expression to match the input prompt of the shell.
(custom-declare-variable 'py-shell-input-prompt-1-regexp '"^>>> " '(#$ . -11380) :type 'string :group 'python)
#@95 *A regular expression to match the input prompt of the shell after the
first line of input.
(custom-declare-variable 'py-shell-input-prompt-2-regexp '"^[.][.][.] " '(#$ . -11559) :type 'string :group 'python)
#@159 *Controls switching to the Python buffer where commands are
executed. When non-nil the buffer switches to the Python buffer, if
not no switching occurs.
(custom-declare-variable 'py-shell-switch-buffers-on-execute 't '(#$ . -11777) :type 'boolean :group 'python)
#@257 When an exception occurs as a result of py-execute-region, a
subsequent py-up-exception needs the line number where the region
started, in order to jump to the correct file line. This variable is
set in py-execute-region and used in py-jump-to-exception.
(defvar py-line-number-offset 0 (#$ . 12052))
#@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 (#$ . 12361))
#@76 Face for pseudo keywords in Python mode, like self, True, False, Ellipsis.
(defvar py-pseudo-keyword-face 'py-pseudo-keyword-face (#$ . 12581))
(make-face 'py-pseudo-keyword-face)
#@25 Face method decorators.
(defvar py-decorators-face 'py-decorators-face (#$ . 12767))
(make-face 'py-decorators-face)
#@59 Face for builtins like TypeError, object, open, and exec.
(defvar py-builtins-face 'py-builtins-face (#$ . 12890))
(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 "\304\305\306\307#\304\305\310\307#\304\305\311\307#\304\305\312\307#\313\314\315Q\316B\317 \315Q\320\321E\314\n\322Q\316B\314\323Q\316\321E\324\325\326\327\257 ,\207" [kw4 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:") ("__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") ("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") ("^[ ]*\\(@.+\\)" 1 'py-decorators-face) "\\<\\(" "\\)\\>[ \n (]" 1 "\\([^. ]\\|^\\)[ ]*\\<\\(" 2 py-builtins-face "\\)[ \n (]" "\\)[ \n :,(]" ("[ ]*\\(\\<from\\>.*\\)?\\<import\\>.*\\<\\(as\\)\\>" . 2) ("\\<class[ ]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)" 1 font-lock-type-face) ("\\<def[ ]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)" 1 font-lock-function-name-face) ("\\<\\(self\\|None\\|True\\|False\\|Ellipsis\\)\\>" 1 py-pseudo-keyword-face)] 9) (#$ . 13365))
(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 (#$ . 15770))
(byte-code "\301B\302\301!\204 \303\301\304\"\210\305B\302\305!\204 \303\305\304\"\210\304\207" [current-load-list py-pdbtrack-is-tracking-p default-boundp set-default nil py-pychecker-history] 3)
#@54 Regular expression matching a Python string literal.
(defconst py-stringlit-re "[rR]?'''[^']*\\(\\('[^']\\|''[^']\\)[^']*\\)*'''\\|[rR]?\"\"\"[^\"]*\\(\\(\"[^\"]\\|\"\"[^\"]\\)[^\"]*\\)*\"\"\"\\|[rR]?'\\([^'\n\\]\\|\\\\.\\)*'\\|[rR]?\"\\([^\"\n\\]\\|\\\\.\\)*\"" (#$ . 16116))
#@66 Regular expression matching Python backslash continuation lines.
(defconst py-continued-re (concat "\\(" "[^#'\"\n\\]" "\\|" py-stringlit-re "\\)*" "\\\\$") (#$ . 16399))
#@54 Regular expression matching a blank or comment line.
(defconst py-blank-or-comment-re "[ ]*\\($\\|#\\)" (#$ . 16576))
#@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) (#$ . 16701))
#@69 Regular expression matching keywords which typically close a block.
(defconst py-block-closing-keywords-re "\\(return\\|raise\\|break\\|continue\\|pass\\)" (#$ . 16956))
#@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) (#$ . 17132))
#@47 Regular expression that describes tracebacks.
(defvar py-traceback-line-re "[ ]+File \"\\([^\"]+\\)\", line \\([0-9]+\\)" (#$ . 17479))
#@63 Regular expression pdbtrack uses to find a stack trace entry.
(defconst py-pdbtrack-stack-entry-regexp "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_]+\\)()" (#$ . 17622))
#@61 Regular expression pdbtrack uses to recognize a pdb prompt.
(defconst py-pdbtrack-input-prompt "\n[(<]*[Pp]db[>)]+ " (#$ . 17795))
#@72 Max number of characters from end of buffer to search for stack entry.
(defconst py-pdbtrack-track-range 10000 (#$ . 17932))
#@47 Abbrev table in use in `python-mode' buffers.
(defvar python-mode-abbrev-table nil (#$ . 18063))
(define-abbrev-table 'python-mode-abbrev-table nil)
#@32 *Hook called by `python-mode'.
(defvar python-mode-hook nil (#$ . -18218))
(make-obsolete-variable 'jpython-mode-hook 'jython-mode-hook)
#@77 *Hook called by `jython-mode'. `jython-mode' also calls
`python-mode-hook'.
(defvar jython-mode-hook nil (#$ . -18361))
#@29 *Hook called by `py-shell'.
(defvar py-shell-hook nil (#$ . -18487))
(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 (#$ . 18683))
(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 (#$ . 20530))
(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 (#$ . 20969))
(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 (#$ . 21266))
(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 (#$ . 22006))
(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\303B\304BBB\207" [body condition-case nil progn ((error nil))] 4 (#$ . 22309)]))
#@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 (#$ . 22505)])
(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'