aboutsummaryrefslogtreecommitdiffstats
path: root/test/automated/python-tests.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename all test files to reflect source layout.Phillip Lord2015-11-241-5232/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * CONTRIBUTE,Makefile.in,configure.ac: Update to reflect test directory moves. * test/file-organisation.org: New file. * test/automated/Makefile.in test/automated/data/decompress/foo.gz test/automated/data/epg/pubkey.asc test/automated/data/epg/seckey.asc test/automated/data/files-bug18141.el.gz test/automated/data/flymake/test.c test/automated/data/flymake/test.pl test/automated/data/package/archive-contents test/automated/data/package/key.pub test/automated/data/package/key.sec test/automated/data/package/multi-file-0.2.3.tar test/automated/data/package/multi-file-readme.txt test/automated/data/package/newer-versions/archive-contents test/automated/data/package/newer-versions/new-pkg-1.0.el test/automated/data/package/newer-versions/simple-single-1.4.el test/automated/data/package/package-test-server.py test/automated/data/package/signed/archive-contents test/automated/data/package/signed/archive-contents.sig test/automated/data/package/signed/signed-bad-1.0.el test/automated/data/package/signed/signed-bad-1.0.el.sig test/automated/data/package/signed/signed-good-1.0.el test/automated/data/package/signed/signed-good-1.0.el.sig test/automated/data/package/simple-depend-1.0.el test/automated/data/package/simple-single-1.3.el test/automated/data/package/simple-single-readme.txt test/automated/data/package/simple-two-depend-1.1.el test/automated/abbrev-tests.el test/automated/auto-revert-tests.el test/automated/calc-tests.el test/automated/icalendar-tests.el test/automated/character-fold-tests.el test/automated/comint-testsuite.el test/automated/descr-text-test.el test/automated/electric-tests.el test/automated/cl-generic-tests.el test/automated/cl-lib-tests.el test/automated/eieio-test-methodinvoke.el test/automated/eieio-test-persist.el test/automated/eieio-tests.el test/automated/ert-tests.el test/automated/ert-x-tests.el test/automated/generator-tests.el test/automated/let-alist.el test/automated/map-tests.el test/automated/advice-tests.el test/automated/package-test.el test/automated/pcase-tests.el test/automated/regexp-tests.el test/automated/seq-tests.el test/automated/subr-x-tests.el test/automated/tabulated-list-test.el test/automated/thunk-tests.el test/automated/timer-tests.el test/automated/epg-tests.el test/automated/eshell.el test/automated/faces-tests.el test/automated/file-notify-tests.el test/automated/auth-source-tests.el test/automated/gnus-tests.el test/automated/message-mode-tests.el test/automated/help-fns.el test/automated/imenu-test.el test/automated/info-xref.el test/automated/mule-util.el test/automated/isearch-tests.el test/automated/json-tests.el test/automated/bytecomp-tests.el test/automated/coding-tests.el test/automated/core-elisp-tests.el test/automated/decoder-tests.el test/automated/files.el test/automated/font-parse-tests.el test/automated/lexbind-tests.el test/automated/occur-tests.el test/automated/process-tests.el test/automated/syntax-tests.el test/automated/textprop-tests.el test/automated/undo-tests.el test/automated/man-tests.el test/automated/completion-tests.el test/automated/dbus-tests.el test/automated/newsticker-tests.el test/automated/sasl-scram-rfc-tests.el test/automated/tramp-tests.el test/automated/obarray-tests.el test/automated/compile-tests.el test/automated/elisp-mode-tests.el test/automated/f90.el test/automated/flymake-tests.el test/automated/python-tests.el test/automated/ruby-mode-tests.el test/automated/subword-tests.el test/automated/replace-tests.el test/automated/simple-test.el test/automated/sort-tests.el test/automated/subr-tests.el test/automated/reftex-tests.el test/automated/sgml-mode-tests.el test/automated/tildify-tests.el test/automated/thingatpt.el test/automated/url-future-tests.el test/automated/url-util-tests.el test/automated/add-log-tests.el test/automated/vc-bzr.el test/automated/vc-tests.el test/automated/xml-parse-tests.el test/BidiCharacterTest.txt test/biditest.el test/cedet/cedet-utests.el test/cedet/ede-tests.el test/cedet/semantic-ia-utest.el test/cedet/semantic-tests.el test/cedet/semantic-utest-c.el test/cedet/semantic-utest.el test/cedet/srecode-tests.el test/cedet/tests/test.c test/cedet/tests/test.el test/cedet/tests/test.make test/cedet/tests/testdoublens.cpp test/cedet/tests/testdoublens.hpp test/cedet/tests/testfriends.cpp test/cedet/tests/testjavacomp.java test/cedet/tests/testnsp.cpp test/cedet/tests/testpolymorph.cpp test/cedet/tests/testspp.c test/cedet/tests/testsppcomplete.c test/cedet/tests/testsppreplace.c test/cedet/tests/testsppreplaced.c test/cedet/tests/testsubclass.cpp test/cedet/tests/testsubclass.hh test/cedet/tests/testtypedefs.cpp test/cedet/tests/testvarnames.c test/etags/CTAGS.good test/etags/ETAGS.good_1 test/etags/ETAGS.good_2 test/etags/ETAGS.good_3 test/etags/ETAGS.good_4 test/etags/ETAGS.good_5 test/etags/ETAGS.good_6 test/etags/a-src/empty.zz test/etags/a-src/empty.zz.gz test/etags/ada-src/2ataspri.adb test/etags/ada-src/2ataspri.ads test/etags/ada-src/etags-test-for.ada test/etags/ada-src/waroquiers.ada test/etags/c-src/a/b/b.c test/etags/c-src/abbrev.c test/etags/c-src/c.c test/etags/c-src/dostorture.c test/etags/c-src/emacs/src/gmalloc.c test/etags/c-src/emacs/src/keyboard.c test/etags/c-src/emacs/src/lisp.h test/etags/c-src/emacs/src/regex.h test/etags/c-src/etags.c test/etags/c-src/exit.c test/etags/c-src/exit.strange_suffix test/etags/c-src/fail.c test/etags/c-src/getopt.h test/etags/c-src/h.h test/etags/c-src/machsyscalls.c test/etags/c-src/machsyscalls.h test/etags/c-src/sysdep.h test/etags/c-src/tab.c test/etags/c-src/torture.c test/etags/cp-src/MDiagArray2.h test/etags/cp-src/Range.h test/etags/cp-src/burton.cpp test/etags/cp-src/c.C test/etags/cp-src/clheir.cpp.gz test/etags/cp-src/clheir.hpp test/etags/cp-src/conway.cpp test/etags/cp-src/conway.hpp test/etags/cp-src/fail.C test/etags/cp-src/functions.cpp test/etags/cp-src/screen.cpp test/etags/cp-src/screen.hpp test/etags/cp-src/x.cc test/etags/el-src/TAGTEST.EL test/etags/el-src/emacs/lisp/progmodes/etags.el test/etags/erl-src/gs_dialog.erl test/etags/f-src/entry.for test/etags/f-src/entry.strange.gz test/etags/f-src/entry.strange_suffix test/etags/forth-src/test-forth.fth test/etags/html-src/algrthms.html test/etags/html-src/index.shtml test/etags/html-src/software.html test/etags/html-src/softwarelibero.html test/etags/lua-src/allegro.lua test/etags/objc-src/PackInsp.h test/etags/objc-src/PackInsp.m test/etags/objc-src/Subprocess.h test/etags/objc-src/Subprocess.m test/etags/objcpp-src/SimpleCalc.H test/etags/objcpp-src/SimpleCalc.M test/etags/pas-src/common.pas test/etags/perl-src/htlmify-cystic test/etags/perl-src/kai-test.pl test/etags/perl-src/yagrip.pl test/etags/php-src/lce_functions.php test/etags/php-src/ptest.php test/etags/php-src/sendmail.php test/etags/prol-src/natded.prolog test/etags/prol-src/ordsets.prolog test/etags/ps-src/rfc1245.ps test/etags/pyt-src/server.py test/etags/tex-src/gzip.texi test/etags/tex-src/nonewline.tex test/etags/tex-src/testenv.tex test/etags/tex-src/texinfo.tex test/etags/y-src/atest.y test/etags/y-src/cccp.c test/etags/y-src/cccp.y test/etags/y-src/parse.c test/etags/y-src/parse.y test/indent/css-mode.css test/indent/js-indent-init-dynamic.js test/indent/js-indent-init-t.js test/indent/js-jsx.js test/indent/js.js test/indent/latex-mode.tex test/indent/modula2.mod test/indent/nxml.xml test/indent/octave.m test/indent/pascal.pas test/indent/perl.perl test/indent/prolog.prolog test/indent/ps-mode.ps test/indent/ruby.rb test/indent/scheme.scm test/indent/scss-mode.scss test/indent/sgml-mode-attribute.html test/indent/shell.rc test/indent/shell.sh test/redisplay-testsuite.el test/rmailmm.el test/automated/buffer-tests.el test/automated/cmds-tests.el test/automated/data-tests.el test/automated/finalizer-tests.el test/automated/fns-tests.el test/automated/inotify-test.el test/automated/keymap-tests.el test/automated/print-tests.el test/automated/libxml-tests.el test/automated/zlib-tests.el: Files Moved.
* Fix bug#21762Juanma Barranquero2015-11-011-0/+8
| | | | | | | | | * lisp/progmodes/python.el (python-syntax-closing-paren-p): Check with `eql' instead of `=' to accommodate the case that (syntax-after (point)) returns nil. * test/automated/python-tests.el (python-indent-inside-paren-7): New test.
* * test/automated/python-tests.el: Avoid warningsJuanma Barranquero2015-11-011-5/+7
| | | | | | | | | | | | | (python-tests-with-temp-buffer, python-tests-with-temp-file): Bind `python-indent-guess-indent-offset' to nil. # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master # Your branch is up-to-date with 'origin/master'. # # Changes to be committed: # modified: test/automated/python-tests.el #
* ; Remove extraneous "coding: utf-8" specifications in Elisp filesDmitry Gutov2015-09-291-1/+0
|
* Support automated ‘make check’ in non-C localePaul Eggert2015-09-031-7/+14
| | | | | | | | | | | | | | | | | | | | | This lets the builder optionally test Emacs behavior in other locales. The C locale is still the default for tests. * test/automated/Makefile.in (TEST_LOCALE): New macro. (emacs): Use it. * test/automated/flymake-tests.el (flymake-tests--current-face): Use C locale for subprocesses so that tests behave as expected. * test/automated/python-tests.el: (python-shell-prompt-validate-regexps-1) (python-shell-prompt-validate-regexps-2) (python-shell-prompt-validate-regexps-3) (python-shell-prompt-validate-regexps-4) (python-shell-prompt-validate-regexps-5) (python-shell-prompt-validate-regexps-6) (python-shell-prompt-set-calculated-regexps-1): Adjust expected output to match locale. * test/automated/tildify-tests.el (tildify-test--test) (tildify-space-test--test, tildify-space-undo-test--test): This test assumes UTF-8 encoding.
* Fix Python tests on MS-WindowsEli Zaretskii2015-08-291-10/+23
| | | | | | | | | | | | | | | | | * test/automated/python-tests.el (python-shell-calculate-command-1): Run python-shell-interpreter through shell-quote-argument before comparing with what python-shell-calculate-command returns. (python-shell-calculate-pythonpath-1) (python-shell-calculate-pythonpath-2) (python-shell-calculate-process-environment-2): Use path-separator instead of a literal ':'. (python-shell-calculate-exec-path-2) (python-shell-calculate-exec-path-3) (python-shell-calculate-exec-path-4) (python-shell-with-environment-1) (python-shell-with-environment-2): Run "/env/bin" through expand-file-name before comparing with exec-path. (Bug#21375)
* python.el: Fix python-shell-buffer-substring on indented codeFabián Ezequiel Gallina2015-08-231-0/+55
| | | | | | | | | | | | Fixes: debbugs:21086 * lisp/progmodes/python.el (python-shell-buffer-substring): Respect current line indentation when calculating string. * test/automated/python-tests.el (python-shell-buffer-substring-10) (python-shell-buffer-substring-11) (python-shell-buffer-substring-12): New tests.
* python.el: Ensure remote process-environment on non-interactive processesFabián Ezequiel Gallina2015-08-211-2/+3
| | | | | | | | * lisp/progmodes/python.el (python-shell-tramp-refresh-process-environment): New function. (python-shell-with-environment): Use it. * test/automated/python-tests.el (python-shell-with-environment-2): Update.
* python.el: Enhancements to process environment setup.Fabián Ezequiel Gallina2015-08-211-62/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-shell-process-environment) (python-shell-extra-pythonpaths, python-shell-exec-path) (python-shell-virtualenv-root): Update docstring. Remove :safe. (python-shell-setup-codes): Remove :safe. (python-shell-remote-exec-path): New defcustom. (python-shell--add-to-path-with-priority): New macro. (python-shell-calculate-pythonpath): Give priority to python-shell-extra-pythonpaths. Update docstring. (python-shell-calculate-process-environment): Give priority to python-shell-process-environment. Update docstring. (python-shell-calculate-exec-path): Give priority to python-shell-exec-path and calculated virtualenv bin directory. Update docstring. (python-shell-tramp-refresh-remote-path): New function. (python-shell-with-environment): Use it when working remotely and do not modify tramp-remote-path. Allow nesting. (python-shell-calculate-command): Remove useless python-shell-with-environment call. * test/automated/python-tests.el (python-shell-calculate-pythonpath-1) (python-shell-calculate-pythonpath-2) (python-shell-calculate-process-environment-6) (python-shell-calculate-process-environment-7) (python-shell-calculate-process-environment-8) (python-shell-calculate-exec-path-3) (python-shell-calculate-exec-path-4) (python-shell-calculate-exec-path-5) (python-shell-calculate-exec-path-6) (python-shell-with-environment-3): New tests. (python-shell-calculate-process-environment-2) (python-shell-calculate-process-environment-3) (python-shell-calculate-process-environment-4) (python-shell-calculate-process-environment-5) (python-shell-calculate-exec-path-1) (python-shell-calculate-exec-path-2) (python-shell-with-environment-1) (python-shell-with-environment-2): Update and simplify.
* python.el: Fix local/remote shell environment setupFabián Ezequiel Gallina2015-07-061-8/+36
| | | | | | | | * lisp/progmodes/python.el (python-shell-with-environment): Fix remote/local environment setup. * test/automated/python-tests.el (python-shell-with-environment-1) (python-shell-with-environment-2): New tests.
* python.el: Fix mark-defun behavior (Bug#19665)Fabián Ezequiel Gallina2015-07-061-0/+152
| | | | | | | * lisp/progmodes/python.el: (python-mark-defun): New function. * test/automated/python-tests.el (python-mark-defun-1) (python-mark-defun-2, python-mark-defun-3): New tests.
* Respect `prog-indentation-context' in python.elChristoph Wedler2015-07-051-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-indent-guess-indent-offset) (python-indent-context, python-indent--calculate-indentation) (python-info-current-defun) (python-info-dedenter-opening-block-message) (python-info-line-ends-backslash-p) (python-info-beginning-of-backslash) (python-info-continuation-line-p): Use `prog-widen'. (python-indent--calculate-indentation) (python-indent--calculate-levels) (python-indent-calculate-indentation): Use `prog-first-column'. (python-indent--calculate-levels): Simplify. Ignore also initial empty lines for syntax calculation. * lisp/progmodes/python.el (python-indent-context): Return :no-indent for first non-empty line, not just in line 1. * test/automated/python-tests.el (python-indent-base-case) (python-indent-inside-paren-1, python-indent-inside-paren-2) (python-indent-inside-paren-3, python-indent-inside-paren-4) (python-indent-inside-paren-5, python-indent-inside-paren-6) (python-indent-after-backslash-1) (python-indent-after-backslash-2) (python-indent-after-backslash-3) (python-indent-after-backslash-4, python-indent-inside-string-1): Expect :no-indent for first non-empty line.
* python.el: Keep symmetry on sexp navigation with parensFabián Ezequiel Gallina2015-04-121-4/+21
| | | | | | | | | | | | | Fixes: debbugs:19954 * lisp/progmodes/python.el (python-nav--forward-sexp): Add argument skip-parens-p. (python-nav-forward-sexp, python-nav-backward-sexp) (python-nav-forward-sexp-safe) (python-nav-backward-sexp-safe): Use it. * test/automated/python-tests.el (python-nav-forward-sexp-1): Fix test.
* python.el: Indent docstring lines to base-indentFabián Ezequiel Gallina2015-04-091-11/+24
| | | | | | | | | | | | | | | Fixes: debbugs:19595 Thanks to immerrr <immerrr@gmail.com> for reporting and providing an initial patch. * lisp/progmodes/python.el (python-indent-context): Add :inside-docstring context. (python-indent--calculate-indentation): Handle :inside-docstring. (python-indent-region): Re-indent docstrings. * test/automated/python-tests.el (python-indent-region-5) (python-indent-inside-string-2): Fix tests.
* python.el: Enhance docstring detection following PEP-257.Fabián Ezequiel Gallina2015-04-051-0/+173
| | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-docstring-at-p): Remove function. (python-info-assignment-statement-p): New function. (python-info-assignment-continuation-line-p): Use it. (python-info-docstring-p): New function. (python-font-lock-syntactic-face-function) (python-fill-string): Use it. * test/automated/python-tests.el (python-info-assignment-statement-p-1) (python-info-assignment-statement-p-2) (python-info-assignment-statement-p-3, python-info-docstring-p-1) (python-info-docstring-p-2, python-info-docstring-p-3) (python-info-docstring-p-4, python-info-docstring-p-5) (python-info-docstring-p-6): New tests.
* Merge from origin/emacs-24Paul Eggert2015-02-251-17/+87
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e726f20 Handle "#" operator properly inside macro. Fix coding bug. 618931b Handle dead frame in menu-bar-non-minibuffer-window-p. (Bug#19728) 017a03a Document MS-Windows file-name idiosyncrasies (Bug#19463) f3faf4f Fix description of Customize buffer in Emacs manual. 1c1d0b7 Fix a typo in the Emacs manual's Hungry Delete description. be7fb82 src/dispextern.h (FACE_FOR_CHAR): Fix the commentary. 33c4409 Spelling fixes 6c8231e python.el: Handle tabs in python-indent-dedent-line. 41c3b92 * lisp/progmodes/python.el: Respect user indentation after comment. 868df45 Avoid compiler warnings in decode_env_path. b28c979 Fix XEmacs version typo in comment and ChangeLog 989fb32 Improve solution of bug #19701 6310530 Fix refilling of list of language environments in User Manual c4c447d Restore XEmacs compatibility Conflicts: doc/emacs/ChangeLog lisp/ChangeLog src/ChangeLog test/ChangeLog
| * python.el: Handle tabs in python-indent-dedent-line.Fabián Ezequiel Gallina2015-01-301-0/+49
| | | | | | | | | | | | | | | | | | | | | | Fixes: debbugs:19730 * lisp/progmodes/python.el (python-indent-dedent-line): Fixes for indentation with tabs. Thanks to <dale@codefu.org>. * test/automated/python-tests.el (python-indent-dedent-line-backspace-2) (python-indent-dedent-line-backspace-3): New tests.
| * * lisp/progmodes/python.el (python-indent-context): Respect userFabián Ezequiel Gallina2015-01-301-17/+38
| | | | | | | | | | | | | | | | | | indentation after comment. * test/automated/python-tests.el (python-indent-pep8-1) (python-indent-pep8-2, python-indent-pep8-3) (python-indent-after-comment-2): Fix tests. (python-indent-after-comment-3): New test.
* | python.el: Keep eldoc visible while typing args.Fabián Ezequiel Gallina2015-02-071-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: debbugs:19637 * lisp/progmodes/python.el (python-eldoc--get-symbol-at-point): New function. (python-eldoc--get-doc-at-point, python-eldoc-at-point): Use it. * test/automated/python-tests.el (python-eldoc--get-symbol-at-point-1) (python-eldoc--get-symbol-at-point-2) (python-eldoc--get-symbol-at-point-3) (python-eldoc--get-symbol-at-point-4): New tests.
* | Fix hideshow integration.Fabián Ezequiel Gallina2015-02-071-45/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: debbugs:19761 * lisp/progmodes/python.el (python-hideshow-forward-sexp-function): New function based on Carlos Pita <carlosjosepita@gmail.com> patch. (python-mode): Make `hs-special-modes-alist` use it and initialize the end regexp with the empty string to avoid skipping parens. * test/automated/python-tests.el (python-tests-visible-string): New function. (python-parens-electric-indent-1) (python-triple-quote-pairing): Fix indentation, move require calls. (python-hideshow-hide-levels-1) (python-hideshow-hide-levels-2): New tests.
* | Merge from origin/emacs-24Fabián Ezequiel Gallina2015-01-281-139/+443
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | 9664def Signal a file-error from directory-files on MS-Windows (Bug#19701) fd4e65e Added missing test for previous commit 5485e3e5 python.el: New non-global state dependent indentation engine. 3b23e6a Fix the description of --insert command-line option (Bug#19694) 7a7e594 Add a cross-reference in ELisp manual. (Bug#19668) b4f4075 Fixes: debbugs:19660 83b3c31 * test/automated/regexp-tests.el: Require regexp-opt Conflicts: lisp/progmodes/python.el
| * Added missing test for previous commitFabián Ezequiel Gallina2015-01-271-0/+17
| |
| * python.el: New non-global state dependent indentation engine.Fabián Ezequiel Gallina2015-01-271-139/+426
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: debbugs:18319 Fixes: debbugs:19595 * lisp/progmodes/python.el (python-syntax-comment-or-string-p): Accept PPSS as argument. (python-syntax-closing-paren-p): New function. (python-indent-current-level) (python-indent-levels): Mark obsolete. (python-indent-context): Return more context cases. (python-indent--calculate-indentation) (python-indent--calculate-levels): New functions. (python-indent-calculate-levels): Use them. (python-indent-calculate-indentation, python-indent-line): (python-indent-line-function): Rewritten to use new API. (python-indent-dedent-line): Simplify logic. (python-indent-dedent-line-backspace): Use `unless`. (python-indent-toggle-levels): Delete function. * test/automated/python-tests.el (python-indent-pep8-1) (python-indent-pep8-2, python-indent-pep8-3) (python-indent-after-comment-1, python-indent-after-comment-2) (python-indent-inside-paren-1, python-indent-inside-paren-2) (python-indent-after-block-1, python-indent-after-block-2) (python-indent-after-backslash-1, python-indent-after-backslash-2) (python-indent-after-backslash-3, python-indent-block-enders-1) (python-indent-block-enders-2, python-indent-block-enders-3) (python-indent-block-enders-4, python-indent-block-enders-5) (python-indent-dedenters-1, python-indent-dedenters-2) (python-indent-dedenters-3, python-indent-dedenters-4) (python-indent-dedenters-5, python-indent-dedenters-6) (python-indent-dedenters-7, python-indent-dedenters-8): Fix tests. (python-indent-base-case, python-indent-after-block-3) (python-indent-after-backslash-5, python-indent-inside-paren-3) (python-indent-inside-paren-4, python-indent-inside-paren-5) (python-indent-inside-paren-6, python-indent-inside-string-1) (python-indent-inside-string-2, python-indent-inside-string-3) (python-indent-dedent-line-backspace-1): New Tests.
| * Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | | | | | Run admin/update-copyright.
* | Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | | | | | Run admin/update-copyright.
* | python.el: Native readline completion.Fabián Ezequiel Gallina2014-12-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds native readline completion that fallbacks to the old mechanism when it cannot be used for the current interpreter. * lisp/progmodes/python.el (python-shell-completion-native-disabled-interpreters) (python-shell-completion-native-enable) (python-shell-completion-native-output-timeout): New defcustoms. (python-shell-completion-native-interpreter-disabled-p) (python-shell-completion-native-try) (python-shell-completion-native-setup) (python-shell-completion-native-turn-off) (python-shell-completion-native-turn-on) (python-shell-completion-native-turn-on-maybe) (python-shell-completion-native-turn-on-maybe-with-msg) (python-shell-completion-native-toggle): New functions. (python-shell-completion-native-get-completions): New function. (python-shell-completion-at-point): Use it. * test/automated/python-tests.el (python-shell-completion-native-interpreter-disabled-p-1): New test.
* | python.el: Enhance shell user interaction and deprecate ↵Fabián Ezequiel Gallina2014-12-271-78/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-shell-get-or-create-process. * lisp/progmodes/python.el (python-shell-get-process-or-error): New function. (python-shell-with-shell-buffer): Use it. (python-shell-send-string, python-shell-send-region) (python-shell-send-buffer, python-shell-send-defun) (python-shell-send-file, python-shell-switch-to-shell): Use it. Add argument MSG to display user-friendly message when no process is running. (python-shell-switch-to-shell): Call pop-to-buffer with NORECORD. (python-shell-make-comint): Rename argument SHOW from POP. Use display-buffer instead of pop-to-buffer. (run-python): Doc fix. Return process. (python-shell-get-or-create-process): Make obsolete. * test/automated/python-tests.el (python-shell-get-or-create-process-1) (python-shell-get-or-create-process-2) (python-shell-get-or-create-process-3): Remove tests.
* | Merge from origin/emacs-24Fabián Ezequiel Gallina2014-12-271-0/+21
|\ \ | |/ | | | | 433af0a * lisp/progmodes/python.el (python-shell-buffer-substring): Handle cornercase when region sent starts at point-min.
| * * lisp/progmodes/python.el (python-shell-buffer-substring): HandleFabián Ezequiel Gallina2014-12-271-0/+21
| | | | | | | | cornercase when region sent starts at point-min.
* | Merge from origin/emacs-24Fabián Ezequiel Gallina2014-12-271-0/+271
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a5f38fa Fix ChangeLog typo c6400e1 Fix composition of characters from Syriac and Arabis scripts. 7e9dfde python.el: Fix message when sending region. 800260c python.el: Cleanup temp files even with eval errors. ed65b91 Fix for previous commit 2dd5163 python.el: Handle file encoding for shell. 7aa506e Spelling fixes 4cd6d77 * automated/tramp-tests.el (tramp-test17-insert-directory): Do not expect a given order of "." and "..". a41d07b Fix rendering of composed caharacters on the mode line. (Bug#19435) b70977c Small doc markup fixes 73c050c * doc/lispref/modes.texi (Defining Minor Modes, SMIE Lexer): Markup fixes. 1783e6c ChangeLog fix c741b1b TUTORIAL.es: Improve style consistency f89efea TUTORIAL.es: spelling fixes 0d48826 Avoid compiler warning. Conflicts: doc/lispref/ChangeLog doc/lispref/control.texi etc/ChangeLog lisp/ChangeLog src/ChangeLog test/ChangeLog
| * python.el: Handle file encoding for shell.Fabián Ezequiel Gallina2014-12-271-0/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-rx-constituents): Add coding-cookie. (python-shell--save-temp-file): Write file with proper encoding. (python-shell-buffer-substring): Add coding cookie for detected encoding to generated content. Fix blank lines when removing if-name-main block. (python-shell-send-file): Handle file encoding. (python-info-encoding-from-cookie) (python-info-encoding): New functions. * test/automated/python-tests.el (python-shell-buffer-substring-1) (python-shell-buffer-substring-2, python-shell-buffer-substring-3) (python-shell-buffer-substring-4, python-shell-buffer-substring-5) (python-shell-buffer-substring-6, python-shell-buffer-substring-7) (python-shell-buffer-substring-8) (python-info-encoding-from-cookie-1) (python-info-encoding-from-cookie-2) (python-info-encoding-from-cookie-3) (python-info-encoding-from-cookie-4) (python-info-encoding-from-cookie-5) (python-info-encoding-from-cookie-6) (python-info-encoding-from-cookie-7, python-info-encoding-1) (python-info-encoding-2): New tests.
* | Merge from origin/emacs-24Fabián Ezequiel Gallina2014-12-271-0/+33
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 216c6aa * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use `tramp-rsh-end-of-line', it ought to be more robust. 20cfd24 Improve indexing on the chapter/section/subsection levels. 14c3739 * lisp/progmodes/js.el (js-syntax-propertize): "return" can't be divided. ea78112 * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Use "\n" as end-of-line delimeter for passwords, when running on MS Windows. 012479a * lisp/progmodes/sh-script.el: Don't set global indent-line-function 75e114f Fix line numbers on Python shell. d0fd23c doc/emacs/buffers.texi (Kill Buffer): Improve indexing. 8e818d1 Keep maximized when going fullscreen. 749813e python.el: Fix electric colon behavior 936d5e5 Fix last patch. 74d3b20 Fixes: debbugs:18623 Conflicts: doc/emacs/ChangeLog doc/lispref/ChangeLog doc/lispref/functions.texi lisp/ChangeLog src/ChangeLog src/xterm.c test/ChangeLog
| * python.el: Fix electric colon behaviorFabián Ezequiel Gallina2014-12-221-0/+33
| | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-indent-post-self-insert-function): Make colon to re-indent only for dedenters, handling multiline-statements gracefully. * test/automated/python-tests.el (python-indent-electric-colon-2) (python-indent-electric-colon-3): New tests.
* | python.el: Generate clearer shell buffer names.Fabián Ezequiel Gallina2014-12-261-55/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-shell-get-process-name) (python-shell-internal-get-process-name): Use `buffer-name`. (python-shell-internal-get-or-create-process): Simplify. * test/automated/python-tests.el (python-shell-get-process-name-1) (python-shell-internal-get-process-name-1): Cleanup. (python-shell-get-process-name-2) (python-shell-internal-get-process-name-2): New tests. (python-shell-calculate-command-1) (python-shell-calculate-process-environment-3) (python-shell-calculate-exec-path-2, python-shell-make-comint-1) (python-shell-make-comint-2, python-shell-make-comint-4) (python-shell-get-process-1, python-util-clone-local-variables-1): Replace obsolete function and variable references with current.
* | Merge branch 'emacs-24'.Paul Eggert2014-11-281-37/+52
|\ \ | |/
| * Set PYTHONUNBUFFERED on shell startup.Fabián Ezequiel Gallina2014-11-221-37/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: debbugs:18595 * lisp/progmodes/python.el (python-shell-unbuffered): New var. (python-shell-calculate-process-environment): Use it. * test/automated/python-tests.el (python-shell-calculate-process-environment-4) (python-shell-calculate-process-environment-5): New tests. (python-shell-make-comint-3): Use file-equal-p. (python-shell-get-or-create-process-1) (python-shell-get-or-create-process-2) (python-shell-get-or-create-process-3): Fix interpreter for Windows.
* | Spelling fixes.Paul Eggert2014-11-161-1/+1
| |
* | * lisp/progmodes/python.el (python-shell-calculate-command): RenameFabián Ezequiel Gallina2014-11-161-6/+4
|/ | | | | | | | | | | | | | from python-shell-parse-command. Cleanup. (run-python, run-python-internal): Use it. (python-shell-calculate-pythonpath): Rename from python-new-pythonpath. (python-shell-calculate-process-environment): Use it. (python-shell-calculate-exec-path): Add comment. * test/automated/python-tests.el (python-shell-calculate-process-environment-2): Fix test. (python-shell-calculate-process-environment-1) (python-shell-calculate-process-environment-3): Cleanup.
* Fixes: debbugs:18432Fabián Ezequiel Gallina2014-11-151-0/+15
| | | | | | | | * lisp/progmodes/python.el (python-indent-calculate-levels): Fix indentation behavior multiline dedenter statement. * test/automated/python-tests.el (python-indent-dedenters-8): New test for Bug#18432.
* Fix region indentationFabián Ezequiel Gallina2014-11-151-0/+104
| | | | | | | | | | | Fixes: debbugs:18843 * lisp/progmodes/python.el (python-indent-region): Use python-indent-line and skip special cases. * test/automated/python-tests.el (python-indent-region-1) (python-indent-region-2, python-indent-region-3) (python-indent-region-4, python-indent-region-5): New tests.
* * lisp/progmodes/python.el (python-indent-post-self-insert-function):Fabián Ezequiel Gallina2014-09-011-0/+14
| | | | | | | Avoid electric colon at beginning-of-defun. * test/automated/python-tests.el: (python-indent-electric-colon-1): New test. (Bug#18228)
* * python-tests.el (python-shell-calculate-exec-path-2): Update testGlenn Morris2014-08-181-1/+1
| | | | for today's python.el changes.
* Spelling fixes.Paul Eggert2014-07-211-1/+1
|
* Make python.el work with IPython automatically. Fabián Ezequiel Gallina2014-07-201-2/+0
| | | | | | | | | | | | | | | | * lisp/progmodes/python.el: (python-shell-completion-setup-code): New value supporting iPython. (python-shell-completion-string-code): New value supporting iPython. (python-shell-completion-get-completions): Use them. (python-shell-completion-module-string-code): Make obsolete. (python-shell-prompt-input-regexps) (python-shell-prompt-output-regexps): Add safeguard for ipdb. (python-shell-output-filter): Fix comment typo. * test/automated/python-tests.el: (python-util-clone-local-variables-1): Fix test. Fixes: debbugs:15510
* Autodetect Python shell prompts. Fabián Ezequiel Gallina2014-07-191-46/+440
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el: (python-shell-interpreter-interactive-arg) (python-shell-prompt-detect-enabled) (python-shell-prompt-detect-failure-warning) (python-shell-prompt-input-regexps) (python-shell-prompt-output-regexps): New vars. (python-shell-prompt-calculated-input-regexp) (python-shell-prompt-calculated-output-regexp): New vars. (python-shell-get-process-name) (python-shell-internal-get-process-name) (python-shell-output-filter) (python-shell-completion-get-completions): Use them. (python-shell-prompt-detect) (python-shell-prompt-validate-regexps): New functions. (python-shell-prompt-set-calculated-regexps): New function. (inferior-python-mode): Use it. Also honor overriden python-shell-interpreter and python-shell-interpreter-args. (python-shell-make-comint): Honor overriden python-shell-interpreter and python-shell-interpreter-args. (python-shell-get-or-create-process): Make it testable by allowing to call run-python non-interactively. (python-util-valid-regexp-p): New function. (python-shell-prompt-regexp, python-shell-prompt-block-regexp) (python-shell-prompt-output-regexp) (python-shell-prompt-pdb-regexp): Use it as defcustom :safe. * test/automated/python-tests.el (python-shell-make-comint-1): (python-shell-make-comint-2): Fix indentation. (python-shell-make-comint-3) (python-shell-make-comint-4): New tests. (python-shell-get-or-create-process-1): Fix test. (python-shell-get-or-create-process-2) (python-shell-get-or-create-process-3): New tests. (python-shell-internal-get-or-create-process-1): Fix test. (python-shell-prompt-detect-1): New test. (python-shell-prompt-detect-2): New test. (Bug#17370) (python-shell-prompt-detect-3) (python-shell-prompt-detect-4) (python-shell-prompt-detect-5) (python-shell-prompt-detect-6) (python-shell-prompt-validate-regexps-1) (python-shell-prompt-validate-regexps-2) (python-shell-prompt-validate-regexps-3) (python-shell-prompt-validate-regexps-4) (python-shell-prompt-validate-regexps-5) (python-shell-prompt-validate-regexps-6) (python-shell-prompt-validate-regexps-7) (python-shell-prompt-set-calculated-regexps-1) (python-shell-prompt-set-calculated-regexps-2) (python-shell-prompt-set-calculated-regexps-3) (python-shell-prompt-set-calculated-regexps-4) (python-shell-prompt-set-calculated-regexps-5) (python-shell-prompt-set-calculated-regexps-6) (python-util-valid-regexp-p-1): New tests.
* Fix dedenters and electric colon handling.Fabián Ezequiel Gallina2014-07-091-113/+637
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-rx-constituents): Add dedenter and block-ender. (python-indent-dedenters, python-indent-block-enders): Delete. (python-indent-context): Return new case for dedenter-statement. (python-indent-calculate-indentation): Handle new case. (python-indent-calculate-levels): Fix levels calculation for dedenter statements. (python-indent-post-self-insert-function): Fix colon handling. (python-info-dedenter-opening-block-message): New function. (python-indent-line): Use it. (python-info-closing-block) (python-info-closing-block-message): Remove. (python-info-dedenter-opening-block-position) (python-info-dedenter-opening-block-positions) (python-info-dedenter-statement-p): New functions. * test/automated/python-tests.el (python-indent-block-enders-1) (python-indent-block-enders-2): Fix tests. (python-indent-block-enders-3) (python-indent-block-enders-4) (python-indent-block-enders-5) (python-indent-dedenters-1) (python-indent-dedenters-2): Remove tests. (python-indent-dedenters-1) (python-indent-dedenters-2) (python-indent-dedenters-3) (python-indent-dedenters-4) (python-indent-dedenters-5) (python-indent-dedenters-6) (python-indent-dedenters-7) (python-info-dedenter-opening-block-position-1) (python-info-dedenter-opening-block-position-2) (python-info-dedenter-opening-block-position-3) (python-info-dedenter-opening-block-positions-1) (python-info-dedenter-opening-block-positions-2) (python-info-dedenter-opening-block-positions-3) (python-info-dedenter-opening-block-positions-4) (python-info-dedenter-opening-block-positions-5) (python-info-dedenter-opening-block-message-1) (python-info-dedenter-opening-block-message-2) (python-info-dedenter-opening-block-message-3) (python-info-dedenter-opening-block-message-4) (python-info-dedenter-opening-block-message-5) (python-info-dedenter-statement-p-1) (python-info-dedenter-statement-p-2) (python-info-dedenter-statement-p-3) (python-info-dedenter-statement-p-4) (python-info-dedenter-statement-p-5): New tests. Fixes: debbugs:15163
* * lisp/progmodes/python.el (python-indent-post-self-insert-function):Fabián Ezequiel Gallina2014-07-011-25/+89
| | | | | | | | | | Enhancements to electric indentation behavior inside parens. * test/automated/python-tests.el (python-tests-self-insert): New function. (python-triple-quote-pairing): Use it. (python-util-forward-comment-1): New test. (Bug#17658)
* Fix completion retrieval parsing.Fabián Ezequiel Gallina2014-06-211-0/+9
| | | | | | | | | | * progmodes/python.el (python-mode): (python-util-strip-string): New function. (python-shell-completion-get-completions): Use it. * automated/python-tests.el (python-util-strip-string-1): New test. Fixes: debbugs:17209
* Fix python-triple-quote-pairing testGlenn Morris2014-04-081-24/+30
| | | | | * test/automated/python-tests.el (python-triple-quote-pairing): Enable/disable electric-pair-mode as needed.
* Fix triple-quoting electricity in python-modeJoão Távora2014-04-071-0/+39
| | | | | | | | | | * lisp/progmodes/python.el (python-electric-pair-string-delimiter): Fix triple-quoting electricity. * test/automated/python-tests.el (python-triple-quote-pairing): New test. (python-syntax-after-python-backspace): New test. Fixes: debbugs:17192