summaryrefslogtreecommitdiff
path: root/Misc/python-mode.el
AgeCommit message (Collapse)AuthorLines
2001-07-06(py-version): Hopefully fixed my XEmacs settings so this doesn't getBarry Warsaw-1/+1
clobbered on checkin.
2001-07-06(py-continuation-offset): Update docstring to describe that thisBarry Warsaw-4/+9
additional offset is only applied to continuation lines for block opening statements. (py-compute-indentation): Only add py-continuation-offset if py-statement-opens-block-p is true.
2001-06-19(python-font-lock-keywords): Add "yield" as a keyword to support theBarry Warsaw-2/+2
new "simple generators" feature of 2.2. See PEP 255.
2001-06-18(py-continuation-offset): New variable which controls how much toBarry Warsaw-3/+12
indent continuation lines, defined as lines following those that end in backslash. (py-compute-indentation): Support for py-continuation-offset.
2001-04-11(py-pdbtrack-track-stack-file): On Ken's suggestion, add "pdbtrack:"Barry Warsaw-3/+3
prefix to the message lines.
2001-04-11intermediateBarry Warsaw-51/+148
2001-02-24(py-parse-state): Teach python-mode how to scan code which followsBarry Warsaw-3/+11
multi-line list comprehensions.
2001-02-20(py-execute-region): This one's easy... kill the temporary file'sBarry Warsaw-2/+4
buffer after executing its contents.
2000-12-27(python-font-lock-keywords): Add highlighting of `as' as a keyword,Barry Warsaw-0/+2
but only in "import foo as bar" statements (including optional preceding `from' clause).
2000-10-27(py-goto-beginning-of-tqs): When searching backwards for the matchingBarry Warsaw-4/+8
delimiter, watch out for backslash escaped delimiters. Also use = instead of eq for character comparison (because a character is = to it's integer value, but not eq to it).
2000-06-23(py-execute-region): Make sure the new temporary buffer is current forBarry Warsaw-3/+4
the insertion of the text.
2000-05-23(py-execute-region): Based on suggestions by Francois Pinard and SkipBarry Warsaw-4/+25
Montanaro, handle execution of indented regions by inserting an "if 1:" in front of the block. This better preserves things like triple quoted strings and commented regions. This patch resolves PR#264.
1999-08-10(py-shell): Set the default shell if not set yet. It's sometimesBarry Warsaw-0/+3
convenient to call py-shell before the first Python file has been visited.
1999-07-28A few minor Customize changes:Barry Warsaw-3/+6
(python): Set defgroup :prefix to "py-" to make variable names cleaner. (py-jpython-command, py-jpython-command-args): Set :tag for proper capitalization of JPython in variable name display.
1999-07-28(python-mode): Set which interpreter (CPython or JPython) to use theBarry Warsaw-18/+21
first time a py buffer is visited during the Emacs session. This ensures that py-which-shells is initialized and also guarantees that the mode lines reflect the correct shell. First bug found by GvR, second one has long bugged :) me. (py-toggle-shells): Programmatically, arg can also take the symbols `cpython' or `jpython', which makes it easy to call with the value of py-default-interpreter. (py-shell): Don't need to initialize py-which-* variables since these will guarantee to be initialized by python-mode when the first py buffer is visited. (py-default-interpreter): Update docstring.
1999-07-27(py-beginning-of-def-or-class): Only move to match-beginning if theBarry Warsaw-2/+2
regex match actually succeeded!
1999-06-03(py-statement-closes-block-p): py-goto-initial-line could leave us inBarry Warsaw-2/+2
the line's whitespace. back-to-indentation should /follow/ this call.
1999-05-24(py-electric-backspace): I'm not sure this function should be specialBarry Warsaw-4/+5
casing when py-honor-comment-indentation is nil, but this could be a religious issue with some. Seems to me we should still be dedenting such comment lines one level.
1999-05-24(py-parse-state): When running under Emacs -- which doesn't haveBarry Warsaw-1/+7
buffer-syntactic-context -- just short circuit the TQS test by jumping to point-min and doing the test from there. For long files, this will be faster than looping with a re-search-backwards.
1999-05-24(py-statement-closes-block-p): Add a py-goto-initial-line which fixesBarry Warsaw-0/+1
indentation when the return value is a multiline sexp: def bug(): try: if 2>1: return (11+ 12) else: #XXX return 12 except: return 13
1999-02-16(py-shell): Added optional argprompt, which will prompt for additionalBarry Warsaw-12/+30
switches to pass into the shell process (only on initial startup).
1999-02-16(py-default-interpreter): New variable which selects whether CPythonBarry Warsaw-2/+32
or JPython is the default interpreter to use when `C-c !' is entered for the first time.
1999-01-21(py-mode-map): Add back force of RET (aka C-m) toBarry Warsaw-0/+9
py-newline-and-indent.
1999-01-19(py-mode-map): Removed special bindings for C-m and C-j toBarry Warsaw-3/+0
py-newline-and-indent. These ought to get picked up by the mapcar that follows; any existing binding to newline-and-indent gets shadowed to py-newline-and-indent. This will break some people who, e.g. bind C-m or C-j to newline but still want these bound to py-newline-and-indent in Python mode. On the other hand, the forced binding pisses off Emacs diehards. So consider this experimental and see if any tall Dutch guys complain :-)
1999-01-18(py-narrow-to-defun): New command (bound to C-x n d) which mimics theBarry Warsaw-0/+15
standard narrow-to-defun but works with Python classes and methods. With no arg, narrows to most enclosing def/method. With C-u arg, narrows to most enclosing class.
1999-01-15(py-electric-delete): Implement the XEmacs 21 blessed way of checkingBarry Warsaw-3/+4
for delete forwardness.
1999-01-09(py-outdent-p): Short circuit infloop for illegal constructBarry Warsaw-0/+2
(e.g. except: on first line of buffer).
1998-12-15(py-goto-beginning-of-tqs): Finds the beginning of the triple quotedBarry Warsaw-11/+28
string we find ourselves in, based on the passed in delimiter. (py-compute-indentation): Fixes for indentation errors when we land inside a triple quoted string. For example: def foo(): if os.path.isfile(o_pri_mbox_file) and os.path.isfile(o_pub_mbox_file): print """\ I found both a private and a public mbox archive file private: %s public : %s I won't move either file, but you should choose one and move it to %s You may want to merge them manually, but be careful about exposing private correspondences to the public.""" % ( o_pri_mbox_file, o_pub_mbox_file, mbox_file) *----indentation would be wrong on this line.
1998-11-20(py-execute-region): Hack around the different behavior and switchBarry Warsaw-14/+21
semantics between CPython/JPython when the script source is piped to stdin.
1998-11-17(py-execute-region): Patch by Hunter Kelly so that execution uses theBarry Warsaw-4/+4
correct Python shell (CPython or JPython).
1998-10-28(py-imenu-method-regexp): Fix suggested by Daniel Calvelo toBarry Warsaw-2/+6
generalize the matching of function arguments.
1998-10-28#XEmacs 21 now supports Imenu, so I am able to test (and fix) someBarry Warsaw-90/+71
#simple things. First step: rename the Imenu supportive variables and #functions in this file to py-imenu-* so I can grok what is part of #python-mode and what is part of Imenu. (py-imenu-create-index-engine): Fixed problem with two classes in a single file, caused by new semantics of py-beginning-of-def-or-class when called programmatically. #Note, there are still some problems with Imenu when arguments to #functions are funky, but it should be much better now.
1998-10-27#Some minor changes in the commentary, obstensibly to test the newBarry Warsaw-8/+9
#checkin script.
1998-10-27#Fixed some typos in docstrings.Barry Warsaw-6/+6
1998-09-25(py-comint-output-filter-function): Horrible kludgearound for makingBarry Warsaw-1/+4
the de-queing of exec files work for NT XEmacs 21.0.
1998-09-25(py-guess-indent-offset): Only print message about py-indent-offsetBarry Warsaw-3/+4
when in an interactive session (suggested by B. Wiener).
1998-09-24(py-execute-file, py-execute-import-or-reload): Use a Python `raw'Barry Warsaw-2/+2
string in the argument to execfile() so a Windows temp directory named, e.g. c:\\tmp doesn't get interpreted as a file name with an embedded tab! (given by C. Waldman).
1998-09-22(py-block-comment-prefix): Remove trailing space. Also explain thatBarry Warsaw-4/+5
this string should not end with whitespace. (py-compute-indentation): Append whitespace regexp to py-block-comment-prefix so that any combination of intervening whitespace will be recognized.
1998-09-14#Code rearranging to quiet byte-compilerBarry Warsaw-88/+88
1998-08-29(py-in-literal): How'd this get through? c-point => py-pointBarry Warsaw-1/+1
1998-08-20Update commentary. For most stuff, point people to the web pageBarry Warsaw-57/+17
1998-08-20(py-shell-map): New variable contains the keymap used in *Python*Barry Warsaw-5/+12
shell buffers. (py-shell): Moved the require of comint to the top level. Also use-local-map py-shell-map instead of hacking on the comint-mode-map. This eliminates breakage of other comint-mode buffers (e.g. shell).
1998-08-20(py-shell): comint-output-filter-functions is already buffer-localBarry Warsaw-1/+0
1998-08-20(py-process-filter): Deleted this function. In order to fixBarry Warsaw-116/+16
interactions with newer Emacsen, I've rewritten the way all the process filters work in the *Python* buffer. We use more of the comint infrastructure, specifically the default process filter. This means that scrolling is now handled by the default comint variables including comint-scroll-to-bottom-on-output. Note that this is somewhat experimental change! (py-comint-output-filter-function): Moved to here from the obsolete py-process-filter function, the logic to pop and exec the next queued file waiting to be executed. (py-execute-file): Don't bind comint-scroll-to-bottom-on-output to t, and save the excursion when inserting the "working on" message. This lets the standard comint scrolling variables as set by the user, continue to work. (python-mode, py-shell, py-describe-mode): Remove description of py-scroll-process-buffer. Also in py-shell, make comint-output-filter-functions buffer-local, and add py-comint-output-filter-function to this hook (instead of setting the process filter). (py-scroll-process-buffer): Deleted this variable. See comint variables including comint-scroll-to-bottom-on-output. (py-execute-region): When exec files are being queued, push the next temp file on the end of the list. (py-submit-bug-report): Removed reporting of py-scroll-process-buffer.
1998-08-18(imenu-example--create-python-index-engine): Fix nesting breakage whenBarry Warsaw-0/+2
a method definition has args that span multiple lines; be sure to go to the beginning of the method definition -- but watch out for the match-data!
1998-08-10(imenu-example--python-method-regexp): Patch from Christian Tanzer:Barry Warsaw-1/+1
"3.67 fixes Imenu as far as classes are concerned, but some default values for function arguments are still not supported." This ought to fix that problem.
1998-08-10(py-compute-indentation): Changes to the `t' condition which affectBarry Warsaw-9/+15
indetnation of normal statements: The regular expression that searches for indenting comment lines has been changed to not require a space/tab after the first `#'. We then explicitly look for py-block-comment-prefix depending on the value of py-honor-comment-indentation. I think this more accurately reflects the documentation for py-honor-comment-indentation.
1998-08-10#Typos from previous checkinBarry Warsaw-2/+2
1998-08-10Huge number of docstring changes, typo fixes, rewordings, GNU standardBarry Warsaw-185/+233
conformations, etc., etc. inspired and given by Michael Ernst. These include error string fixes, moving of comments to docstrings, some other non-related typos, terminology standardizing (b/w TP and myself, and b/w myself and myself :-) although more can still be done. E.g. "outdenting" => "dedenting".
1998-08-07(py-execute-region): When temp-names are broken (Emacs 19.34), aBarry Warsaw-3/+7
serial number isn't enough to uniquify the temp file name -- what if two users are on the same machine? Add in the (emacs-pid) to help further. Should never be tickled on Emacs 20, XEmacs 20, 21.