-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-mode.elc
912 lines (804 loc) · 110 KB
/
python-mode.elc
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
;ELC
;;; Compiled by shant@ultraio on Sat Sep 27 19:36:33 2014
;;; from file /home/shant/.emacs.d/python-mode.el
;;; in Emacs version 24.3.1
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#@31 `python-mode' version number.
(defconst py-version "$Revision: 4.75 $" (#$ . 505))
(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&\210\316\317\320\321\322\323\312\307&\210\316\324\325\326\322\327\312\307&\210\330\331\332\"\210\316\332\333\334\322\327\312\307\335\336& \210\316\337\340\341\322\342\312\307&\210\316\343\344\345\322\346\312\307&\210\330\347\350\"\210\316\350\351\352\322\353\312\307\335\354& \210\316\355\356\357\322\360\312\307&\210\316\361\356\362\322\360\312\307&\210\316\363\320\364\322\323\312\307&\210\316\365\320\366\322\367\312\307&\210\316\370\371\372\322\327\312\307&\210\316\373\320\374\322\375\312\307&\210\316\376\377\201@ \322\327\312\307&\210\316\201A \320\201B \322\323\312\307&\210\316\201C \320\201D \322\323\312\307&\210\316\201E \320\201F \322\323\312\307&\210\316\201G \201H \201I \322\201J \312\307&\210\316\201K \201L \201M \322\201J \312\307&\210\316\201N \310\201O \322\323\312\307&\210\201P \355!\210\316\201Q \320\201R \322\323\312\307&\210\201P \201Q !\210\316\201S \201T \201U \322\327\312\307&\210\316\201V \201W \201X \322\360\312\307&\210\330\201Y \201Z \"\210\316\201Z \201[ \201\\ \322\201] \312\307&\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-" custom-declare-variable py-tab-always-indent t "*Non-nil means TAB in Python mode should always reindent the current line,\nregardless of where in the line point is when the TAB command is used." :type boolean py-python-command "python" "*Shell command used to start Python interpreter." string make-obsolete-variable py-jpython-command py-jython-command "jython" "*Shell command used to start the Jython interpreter." :tag "Jython Command" py-default-interpreter 'cpython "*Which Python interpreter is used by default.\nThe value for this variable can be either `cpython' or `jython'.\n\nWhen the value is `cpython', the variables `py-python-command' and\n`py-python-command-args' are consulted to determine the interpreter\nand arguments to use.\n\nWhen the value is `jython', the variables `py-jython-command' and\n`py-jython-command-args' are consulted to determine the interpreter\nand arguments to use.\n\nNote that this variable is consulted only the first time that a Python\nmode buffer is visited during an Emacs session. After that, use\n\\[py-toggle-shells] to change the interpreter shell." (choice (const :tag "Python (a.k.a. CPython)" cpython) (const :tag "Jython" jython)) py-python-command-args '("-i") "*List of string arguments to be used when starting a Python shell." (repeat string) py-jpython-command-args py-jython-command-args '("-i") "*List of string arguments to be used when starting a Jython shell." (repeat string) "Jython Command Args" py-indent-offset 4 "*Amount of offset per level of indentation.\n`\\[py-guess-indent-offset]' can usually guess a good value when\nyou're editing someone else's Python code." integer py-continuation-offset "*Additional amount of offset to give for some continuation lines.\nContinuation lines are those that immediately follow a backslash\nterminated line. Only those continuation lines for a block opening\nstatement are given this extra offset." py-smart-indentation "*Should `python-mode' try to automagically set some indentation variables?\nWhen this variable is non-nil, two things happen when a buffer is set\nto `python-mode':\n\n 1. `py-indent-offset' is guessed from existing code in the buffer.\n Only guessed values between 2 and 8 are considered. If a valid\n guess can't be made (perhaps because you are visiting a new\n file), then the value in `py-indent-offset' is used.\n\n 2. `indent-tabs-mode' is turned off if `py-indent-offset' does not\n equal `tab-width' (`indent-tabs-mode' is never turned on by\n Python mode). This means that for newly written code, tabs are\n only inserted in indentation if one tab is one indentation\n level, otherwise only spaces are used.\n\nNote that both these settings occur *after* `python-mode-hook' is run,\nso if you want to defeat the automagic configuration, you must also\nset `py-smart-indentation' to nil in your `python-mode-hook'." py-align-multiline-strings-p "*Flag describing how multi-line triple quoted strings are aligned.\nWhen this flag is non-nil, continuation lines are lined up under the\npreceding line's indentation. When this flag is nil, continuation\nlines are aligned to column zero." (choice (const :tag "Align under preceding line" t) (const :tag "Align to column zero" nil)) py-block-comment-prefix "##" "*String used by \\[comment-region] to comment out a block of code.\nThis should follow the convention for non-indenting comment lines so\nthat the indentation commands won't get confused (i.e., the string\nshould be of the form `#x...' where `x' is not a blank or a tab, and\n`...' is arbitrary). However, this string should not end in whitespace." py-honor-comment-indentation "*Controls how comment lines influence subsequent indentation.\n\nWhen nil, all comment lines are skipped for indentation purposes, and\nif possible, a faster algorithm is used (i.e. X/Emacs 19 and beyond).\n\nWhen t, lines that begin with a single `#' are a hint to subsequent\nline indentation. If the previous line is such a comment line (as\nopposed to one that starts with `py-block-comment-prefix'), then its\nindentation is used as a hint for this line's indentation. Lines that\nbegin with `py-block-comment-prefix' are ignored for indentation\npurposes.\n\nWhen not nil or t, comment lines that begin with a single `#' are used\nas indentation hints, unless the comment character is in column zero." (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)) 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'"))) "*Directory used for temporary files created by a *Python* process.\nBy default, the first directory from this list that exists and that you\ncan write into: the value (if any) of the environment variable TMPDIR,\n/usr/tmp, /tmp, /var/tmp, or the current directory." py-beep-if-tab-change "*Ring the bell if `tab-width' is changed.\nIf a comment of the form\n\n # vi:set tabsize=<number>:\n\nis found before the first code line when the file is entered, and the\ncurrent value of (the general Emacs variable) `tab-width' does not\nequal <number>, `tab-width' is set to <number>, a message saying so is\ndisplayed in the echo area, and if `py-beep-if-tab-change' is non-nil\nthe Emacs bell is also rung as a warning." py-jump-on-exception "*Jump to innermost exception frame in *Python Output* buffer.\nWhen this variable is non-nil and an exception occurs when running\nPython code synchronously in a subprocess, jump immediately to the\nsource code of the innermost traceback frame." py-ask-about-save "If not nil, ask about which buffers to save before executing some code.\nOtherwise, all modified buffers are saved without asking." py-backspace-function 'backward-delete-char-untabify "*Function called by `py-electric-backspace' when deleting backwards." function py-delete-function 'delete-char "*Function called by `py-electric-delete' when deleting forwards." py-imenu-show-method-args-p "*Controls echoing of arguments of functions & methods in the Imenu buffer.\nWhen non-nil, arguments are printed." make-variable-buffer-local py-pdbtrack-do-tracking-p "*Controls whether the pdbtrack feature is enabled or not.\nWhen non-nil, pdbtrack is enabled in all comint-based buffers,\ne.g. shell buffers and the *Python* buffer. When using pdb to debug a\nPython program, pdbtrack notices the pdb prompt and displays the\nsource file and line that the program is stopped at, much the same way\nas gud-mode does for debugging C programs with gdb." py-pdbtrack-minor-mode-string " PDB" "*String to use in the minor mode list when pdbtrack is enabled." py-import-check-point-max 20000 "Maximum number of characters to search for a Java-ish import statement.\nWhen `python-mode' tries to calculate the shell to use (either a\nCPython or a Jython shell), it looks at the so-called `shebang' line\n-- i.e. #! line. If that's not available, it looks at some of the\nfile heading imports to see if they look Java-like." py-jpython-packages py-jython-packages '("java" "javax" "org" "com") "Imported packages that imply `jython-mode'." (repeat string)] 10)
#@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 (#$ . 9394))
(byte-code "\300\301!\210\302\303\304\305\306\307\310\311\312\313& \210\302\314\315\316\306\317\310\311\312\320& \207" [make-variable-buffer-local py-master-file custom-declare-variable py-pychecker-command "pychecker" "*Shell command used to run Pychecker." :type string :group python :tag "Pychecker Command" py-pychecker-command-args '("--stdlib") "*List of string arguments to be passed to pychecker." (repeat string) "Pychecker Command Args"] 10)
#@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)) (#$ . -10370))
(byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\307&\210\300\313\314\315\304\316\306\307&\207" [custom-declare-variable py-shell-input-prompt-1-regexp "^>>> " "*A regular expression to match the input prompt of the shell." :type string :group python py-shell-input-prompt-2-regexp "^[.][.][.] " "*A regular expression to match the input prompt of the shell after the\n first line of input." py-shell-switch-buffers-on-execute t "*Controls switching to the Python buffer where commands are\n executed. When non-nil the buffer switches to the Python buffer, if\n not no switching occurs." boolean] 8)
#@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 (#$ . 11233))
#@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 (#$ . 11542))
#@76 Face for pseudo keywords in Python mode, like self, True, False, Ellipsis.
(defvar py-pseudo-keyword-face 'py-pseudo-keyword-face (#$ . 11762))
(make-face 'py-pseudo-keyword-face)
#@25 Face method decorators.
(defvar py-decorators-face 'py-decorators-face (#$ . 11948))
(make-face 'py-decorators-face)
#@59 Face for builtins like TypeError, object, open, and exec.
(defvar py-builtins-face 'py-builtins-face (#$ . 12071))
(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) (#$ . 12546))
(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 (#$ . 14951))
(defvar py-pdbtrack-is-tracking-p nil)
(defvar py-pychecker-history nil)
#@54 Regular expression matching a Python string literal.
(defconst py-stringlit-re "[rR]?'''[^']*\\(\\('[^']\\|''[^']\\)[^']*\\)*'''\\|[rR]?\"\"\"[^\"]*\\(\\(\"[^\"]\\|\"\"[^\"]\\)[^\"]*\\)*\"\"\"\\|[rR]?'\\([^'\n\\]\\|\\\\.\\)*'\\|[rR]?\"\\([^\"\n\\]\\|\\\\.\\)*\"" (#$ . 15167))
#@66 Regular expression matching Python backslash continuation lines.
(defconst py-continued-re (concat "\\(" "[^#'\"\n\\]" "\\|" py-stringlit-re "\\)*" "\\\\$") (#$ . 15450))
#@54 Regular expression matching a blank or comment line.
(defconst py-blank-or-comment-re "[ ]*\\($\\|#\\)" (#$ . 15627))
#@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) (#$ . 15752))
#@69 Regular expression matching keywords which typically close a block.
(defconst py-block-closing-keywords-re "\\(return\\|raise\\|break\\|continue\\|pass\\)" (#$ . 16007))
#@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) (#$ . 16183))
#@47 Regular expression that describes tracebacks.
(defvar py-traceback-line-re "[ ]+File \"\\([^\"]+\\)\", line \\([0-9]+\\)" (#$ . 16530))
#@63 Regular expression pdbtrack uses to find a stack trace entry.
(defconst py-pdbtrack-stack-entry-regexp "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_]+\\)()" (#$ . 16673))
#@61 Regular expression pdbtrack uses to recognize a pdb prompt.
(defconst py-pdbtrack-input-prompt "\n[(<]*[Pp]db[>)]+ " (#$ . 16846))
#@72 Max number of characters from end of buffer to search for stack entry.
(defconst py-pdbtrack-track-range 10000 (#$ . 16983))
#@47 Abbrev table in use in `python-mode' buffers.
(defvar python-mode-abbrev-table nil (#$ . 17114))
(define-abbrev-table 'python-mode-abbrev-table nil)
#@32 *Hook called by `python-mode'.
(defvar python-mode-hook nil (#$ . -17269))
(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 (#$ . -17412))
#@29 *Hook called by `py-shell'.
(defvar py-shell-hook nil (#$ . -17538))
(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 (#$ . 17734))
(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 (#$ . 19581))
(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 (#$ . 20020))
(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 (#$ . 20317))
(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 (#$ . 21057))
(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 (#$ . 21360)]))
#@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 (#$ . 21556)])
(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'