Commit graph

354 commits

Author SHA1 Message Date
Stefan Monnier
fc553234b5 (python-quote-syntax): Don't bother with syntax-ppss-context.
(python-fill-paragraph): Make sure that fenced-string delimiters that
stand on their own line stay there
2007-03-01 15:07:45 +00:00
Glenn Morris
d7a0267c8d Add 2007 to copyright years. 2007-01-21 03:53:13 +00:00
Richard M. Stallman
a8d5f40f49 (python-indent): Add safe-local-variable prop. 2006-12-04 00:33:19 +00:00
Stefan Monnier
71884b8d18 (inferior-python-mode-syntax-table): New var.
(inferior-python-mode): Use it.
2006-11-14 15:34:15 +00:00
John Wiegley
7a338befad 2006-10-22 John Wiegley <johnw@newartisans.com>
* progmodes/python.el (python-use-skeletons): python-mode was
	auto-inserting templates (for those with abbrev-mode on), not only
	by default -- *but without a configuration variable to disable
	it*.  This rendered python-mode completely useless for me, so I
	have added `python-use-skeletons', which is now off by default.
2006-10-22 20:39:36 +00:00
Richard M. Stallman
be8b7dbd64 (python-preoutput-filter): Fix arg order to string-match. 2006-09-16 17:56:17 +00:00
Stefan Monnier
0b01facaa2 (python-font-lock-keywords): Add `self' and other quasi-keywords. 2006-09-09 19:48:36 +00:00
Stefan Monnier
d8ca7d3475 Quieten the compiler about hippie-expand vars.
(python-send-string): Be slightly more careful about adding \n.
2006-09-09 19:42:35 +00:00
Stefan Monnier
132579d3e8 (python-eldoc-function): Re-enable quit while waiting for process. 2006-08-30 21:10:10 +00:00
Stefan Monnier
e2ac11eba7 (python-send-command): Simplify.
(run-python): Don't generate a new buffer unless `new' was specified.
Make sure we send `import emacs' to the proper process.
2006-08-28 21:58:27 +00:00
Stefan Monnier
6cc91c85a0 (python-send-command): Don't wait for the command
to terminate.  Don't fiddle with compilation-parsing-end.
2006-08-28 21:13:34 +00:00
Stefan Monnier
426348643a (python-send-receive): Wait in the process's buffer so as to check the right
buffer-local variables.
2006-08-26 14:39:16 +00:00
Stefan Monnier
1c1095bfeb (python-preoutput-skip-next-prompt): New var.
(python-preoutput-continuation): Remove.
(python-preoutput-filter): Simplify correspondingly.
Remove handling of _emacs_ok.  Make sure we skip _emacs_out's prompts.
Loop around to catch embedded _emacs_out output.
(run-python): Send the import&print command on a single line.
(python-send-command): Send command&print on a single line.
(python-send-string): Only add double \n if needed.
(python-send-receive): Loop until the result comes.
(python-mode-running): Defvar it.
(python-setup-brm): Remove unused var `menu'.
Only bind py-mode-map and `features' around brm-init.
(python-calculate-indentation): Remove unused var `point'.
(python-beginning-of-defun): Remove unused var `def-line'.
2006-08-25 22:49:14 +00:00
Stefan Monnier
65a16bef23 Remove * in defcustom docstrings.
(run-python, python-proc, python-try-complete): Use derived-mode-p.
(python-mode): Set tab-width and indent-tabs-mode.
2006-08-20 18:14:50 +00:00
Stefan Monnier
c7e8d385a2 Update to Dave Love's latest version.
(python-font-lock-keywords, python-mode): Don't use
font-lock-syntax-table, but match symbol elements explicitly instead.
(python-mode-map): Add help, and a few more key bindings.
(python-skip-comments/blanks): Move out of comments as well.
(python-continuation-line-p): Behave better with unbalanced parens.
(python-blank-line-p): New fun.
(python-open-block-statement-p): Don't use a heuristic.
(python-outdent-p): Better handle blocks-in-the-same-line.
(python-calculate-indentation): Misc improvements.
(python-comment-indent): Remove.
(python-block-pairs): New var.
(python-first-word): New fun.
(python-indentation-levels): Handle more common cases.
(python-indent-line-1): Add `leave' argument.
(python-indent-region): New fun.
(python-skip-out): New fun.
(python-beginning-of-statement, python-end-of-statement): Use it.
(python-next-statement): Return correct count even at eob.
(python-end-of-block): Fix paren-typo.
(python-imenu-create-index): Add module variables.
(run-python): Add `new' arg.  Check we're at a prompt before returning.
(python-send-command): Move to end of buffer.  Wait for prompt to return.
(python-set-proc): New fun.
(python-imports): New var.
(python-describe-symbol): Use it.  Adjust to new interface of `ehelp'.
(python-eldoc-function): Try to move out of arg list.
(python-outline-level): Offset by 1.
(python-find-imports): New fun.
(python-symbol-completions): Use python-imports.
(python-module-path, ffap-alist): Add support for ffap.
(python-skeletons, python-mode-abbrev-table, def-python-skeleton)
(pythin-insert-*, python-default-template, python-expand-template):
Add templates/skeletons.
(python-setup-brm): Support for Bicycle Repair Man.
(python-abbrev-syntax-table): New var.
(python-abbrev-pc-hook, python-pea-hook): New funs.
2006-08-20 17:55:16 +00:00
Stefan Monnier
45e46cb773 (python-continuation-line-p, python-beginning-of-statement):
syntax-ppss may return a negative depth.
2006-04-26 05:26:39 +00:00
Dan Nicolaescu
0fea1d1029 (python-mode): Fix typo. 2006-04-19 06:37:31 +00:00
Dan Nicolaescu
3398a4aee7 (python-mode): Add support for
hs-minor-mode.
2006-04-18 22:34:54 +00:00
Nick Roberts
d91362c9e0 Update copyright for 2006. 2006-02-10 09:00:31 +00:00
Eli Zaretskii
13b0ddbd62 (python-mode) <eldoc-mode-hook>: Pass nil as the first arg to run-python. 2006-01-21 11:48:25 +00:00
Masatake YAMATO
283780dc88 Install to the CVS repository what I forgot to install in my
2005-10-16 changes.

* progmodes/python.el (python-complete-symbol): Pass the common
prefix substring of completion to `display-completion-list'.

* textmodes/org.el (org-complete): Ditto.
2005-10-18 04:31:16 +00:00
Eli Zaretskii
ee6e99e0f0 (python-describe-symbol): Add globals() and locals() to the arguments
of emacs.ehelp.
2005-09-24 10:58:16 +00:00
Romain Francoise
a24c45d2bd * progmodes/compile.el (compilation-start): Add autoload cookie.
* progmodes/antlr-mode.el: Don't autoload `compilation-start'.
* textmodes/sgml-mode.el: Likewise.
* progmodes/python.el: Likewise.
2005-08-27 14:38:22 +00:00
Lute Kamstra
3a35cf56e7 Update FSF's address. 2005-07-04 17:55:18 +00:00
Juanma Barranquero
419557b9e7 (python): Finish `defgroup' description with period.
(inferior-python-mode): "?\ " -> "?\s".
2005-07-04 03:20:48 +00:00
Stefan Monnier
533438b139 (python-check): Require `compile' before modifying its variables. 2005-06-29 06:58:42 +00:00
Richard M. Stallman
8f348211f9 (python-mode): Use new name eldoc-documentation-function. 2005-04-26 11:01:52 +00:00
Stefan Monnier
9f3f6a1854 (python-preoutput-filter): Fix last change. 2005-03-29 14:12:23 +00:00
Stefan Monnier
12566797d3 (python-preoutput-leftover): New var.
(python-preoutput-filter): Use it.
(python-send-receive): Loop until all the result has been received.
2005-03-28 14:36:25 +00:00
Stefan Monnier
95c9ef20be (python-close-block-statement-p)
(python-outdent-p, python-current-defun): Use symbol-end.
2005-03-25 14:36:08 +00:00
Kim F. Storm
bf247b6ed0 Change release version from 21.4 to 22.1 throughout.
Change development version from 21.3.50 to 22.0.50.
2005-02-09 15:50:47 +00:00
Richard M. Stallman
68e442738d (python-mode): Use mode-require-final-newline. 2004-12-31 14:55:23 +00:00
Richard M. Stallman
25f35ef609 (python-font-lock-syntactic-keywords): Fix previous change. 2004-12-03 00:10:23 +00:00
Richard M. Stallman
c22141472a (python-font-lock-syntactic-keywords): Check for escapes in the regexp.
(python-quote-syntax): Don't do it here.
2004-11-25 02:54:58 +00:00
Stefan Monnier
abe0aa3e2a (run-python): Don't hard code *Python*. Don't modify process-environment.
(python-send-region, python-load-file): Don't assume that
python-buffer == (process-buffer (python-proc)).
(python-switch-to-python): Simplify.
2004-11-22 05:52:39 +00:00
Richard M. Stallman
2b2c3c7f62 Don't alter debug-ignored-errors. 2004-11-20 20:40:25 +00:00
Richard M. Stallman
7c6152ff9e (python-switch-to-python): If Python isn't running, start it. 2004-11-20 20:39:16 +00:00
Richard M. Stallman
b830b63b85 (python-beginning-of-statement): Exit the loop if backward-up-list gets error. 2004-07-02 23:49:50 +00:00
Eli Zaretskii
cebe0988ca (python-open-block-statement-p): Fix
indentation after a block opening that contains a comment.
2004-06-12 10:26:37 +00:00
Stefan Monnier
522067b2d4 (help-buffer): Autoload when compiling.
(python-after-info-look): Don't assume Info-goto-node returns non-nil.
(run-python): Prepend to any existing PYTHONPATH.
2004-05-10 18:36:09 +00:00
Stefan Monnier
07c7712fae (inferior-python-mode-map): Remove erroneous C-c C-z binding. 2004-05-10 15:32:01 +00:00
Juanma Barranquero
3299a03a32 (python-describe-symbol): Pass INTERACTIVE-P argument to `help-setup-xref'. 2004-05-08 16:40:01 +00:00
Stefan Monnier
24d5055cef Changes largely merged in from Dave Love's code. Doc fixes.
(python-mode-map): Add python-complete-symbol.
(python-comment-line-p, python-beginning-of-string): Use syntax-ppss.
(python-comment-indent, python-complete-symbol)
(python-symbol-completions, python-partial-symbol)
(python-try-complete): New.
(python-indent-line): Remove optional arg.  Use python-block-end-p.
(python-check): Bind compilation-error-regexp-alist.
(inferior-python-mode): Use rx.  Move keybindings to top level.
Set comint-input-filter.
(python-preoutput-filter): Use rx.
(python-input-filter): Re-introduce.
(python-proc): Start new process if necessary.
Check python-buffer non-nil.
(view-return-to-alist): Defvar.
(python-send-receive): New.
(python-eldoc-function): Use it.
(python-mode-running): Don't defvar.
(python-mode): Set comment-indent-function.
Maybe update hippie-expand-try-functions-list.
(python-indentation-levels): Initialize differently.
(python-block-end-p): New.
(python-indent-line): Use it.
(python-compilation-regexp-alist): Augment.
(run-python): Import `emacs' module to Python rather than loading
code directly.  Set python-buffer differently.
(python-send-region): Use emacs.eexecfile.  Fix orig-start calculation.
Use python-proc.
(python-send-command): Go to end of comint buffer.
(python-load-file): Use python-proc, emacs.eimport.
(python-describe-symbol): Simplify interactive form.
Use emacs.help.  Do use temp-buffer-show-hook.
Call print-help-return-message.
(hippie-exp): Require when compiling.
(python-preoutput-continuation): Use rx.
2004-05-06 20:22:32 +00:00
Stefan Monnier
ee99b45b27 (python-compilation-line-number): Remove.
(python-compilation-regexp-alist): Don't use it any more.
(python-orig-start, python-input-filter): Remove.
(inferior-python-mode): Don't set up comint-input-filter-functions.
(python-send-region): Use compilation-fake-loc.
2004-05-01 21:16:07 +00:00
Stefan Monnier
56e6d6fecc (python-send-command): New fun.
(python-send-region, python-load-file): Use it.
2004-04-29 20:34:11 +00:00
Stefan Monnier
c3f85d9536 (python-maybe-jython): Don't assume point-min==1. 2004-04-21 20:48:47 +00:00
Stefan Monnier
c02484a0f2 (python-compilation-line-number): Fix braindamage.
(python-load-file): Fix python-orig-start setting.
2004-04-16 23:36:13 +00:00
Stefan Monnier
b6ea794037 (python-after-info-look): Use with-no-warnings. 2004-04-16 22:58:28 +00:00
Stefan Monnier
a1ae0e9c89 (python-orig-start-line, python-orig-file): Remove.
(python-orig-start): New var.
(python-input-filter, python-compilation-line-number)
(python-send-region, python-load-file): Use it.
2004-04-14 20:31:53 +00:00
Stefan Monnier
32efc702b3 (run-python): Fix use of \n.
(python-load-file): Remove `try' from Python fragment.
(python-describe-symbol): Fix message.
2004-04-14 20:16:05 +00:00