1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00
Commit Graph

389 Commits

Author SHA1 Message Date
Nicolas Petton
8478885dfa Bump version to 24.5 for the release-candidate 2015-03-27 09:52:01 +01:00
Fabián Ezequiel Gallina
6c8231ee8c python.el: Handle tabs in python-indent-dedent-line.
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.
2015-01-30 00:41:52 -03:00
Fabián Ezequiel Gallina
41c3b9241c * lisp/progmodes/python.el (python-indent-context): Respect user
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.
2015-01-30 00:19:55 -03:00
Fabián Ezequiel Gallina
5485e3e5b2 python.el: New non-global state dependent indentation engine.
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.
2015-01-27 00:17:24 -03:00
Glenn Morris
83b3c312d7 * test/automated/regexp-tests.el: Require regexp-opt 2015-01-23 19:52:07 -05:00
Dmitry Gutov
81fb8ab036 Backport: Fix package tests when TMPDIR is in HOME
Fixes: debbugs:19657

* test/automated/package-test.el (with-package-test):
Bind `abbreviated-home-dir' to nil.
(package-test-describe-package, package-test-signed):
Expect abbreviated directory names.

(cherry picked from commit f02406c74a)
2015-01-23 15:33:25 +02:00
Wolfgang Jenkner
3a345b5062 Backport: Handle the `neg' operator in some calc-units functions.
* lisp/calc/calc-units.el (math-units-in-expr-p)
(math-single-units-in-expr-p, math-find-compatible-unit-rec)
(math-extract-units): Handle the `neg' operator.  (Bug#19582)
* test/automated/calc-tests.el (calc-tests-equal, calc-tests-simple):
New functions.
(test-calc-remove-units, test-calc-extract-units)
(test-calc-convert-units): New tests.
2015-01-22 03:29:23 +01:00
Paul Eggert
732fd4c7e1 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 09:18:06 -08:00
Michael Albinus
d2612290f9 * automated/tramp-tests.el (tramp--test-smb-or-windows-nt-p):
New defun.
(tramp-test30-special-characters): Use it.
(tramp--test-check-files): Filter nil file names out.
2014-12-30 12:45:48 +01:00
Michael Albinus
96ebe180f2 Sync with Tramp 2.2.11.
* automated/tramp-tests.el (tramp-test30-special-characters):
Skip test on MS-Windows.
2014-12-29 17:35:09 +01:00
Fabián Ezequiel Gallina
433af0a060 * lisp/progmodes/python.el (python-shell-buffer-substring): Handle
cornercase when region sent starts at point-min.
2014-12-27 17:22:29 -03:00
Fabián Ezequiel Gallina
2dd5163d76 python.el: Handle file encoding for shell.
* 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.
2014-12-27 01:30:21 -03:00
Michael Albinus
4cd6d77375 * automated/tramp-tests.el (tramp-test17-insert-directory): Do not
expect a given order of "." and "..".
2014-12-25 22:00:08 +01:00
Fabián Ezequiel Gallina
749813e9d4 python.el: Fix electric colon behavior
* 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.
2014-12-22 02:24:42 -03:00
Joao Tavora
bb57c94d5f Consider electric-pair-mode in tex-mode.
Fixes: debbugs:19356

* lisp/textmodes/tex-mode.el (tex-insert-quote): Consider and respect
`electric-pair-mode'.

* test/automated/electric-tests.el (autowrapping-7): New test for
tex-mode's autowrapping.
(electric-pair-test-for): Call the actual key-binding
interactively.
2014-12-14 11:22:46 +00:00
Glenn Morris
db2a7681dd * test/automated/flymake/warnpred/test.pl: Tweak format
The previous format seems to have stopped giving a warning with perl 5.20.1,
for some reason.
2014-12-13 12:56:22 -08:00
Fabián Ezequiel Gallina
238c052fdb Set PYTHONUNBUFFERED on shell startup.
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.
2014-11-22 20:09:30 -03:00
Fabián Ezequiel Gallina
92f58578cc Fixes: debbugs:18432
* 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.
2014-11-15 19:02:52 -03:00
Fabián Ezequiel Gallina
89ebffc1f6 Fix region indentation
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.
2014-11-15 18:10:58 -03:00
Michael Albinus
b03f9b583c Backport Tramp changes from trunk.
* automated/tramp-tests.el (tramp-remote-process-environment):
Declare.
(tramp--test-enabled): Ignore errors.
(tramp--instrument-test-case): Extend docstring.  Print debug
buffer in any case.
(tramp-test15-copy-directory): Skip for tramp-smb.el.
(tramp-test21-file-links): Use `file-truename' for directories.
(tramp-test26-process-file): Extend test according to Bug#17815.
(tramp-test27-start-file-process, tramp-test28-shell-command):
Retrieve process output more robustly.
(tramp-test29-vc-registered): Set $BZR_HOME.
(tramp--test-check-files): Extend test with `substitute-in-file-name'.
(tramp-test30-special-characters): Skip for tramp-adb.el,
tramp-gvfs.el and tramp-smb.el.  Add further file names.
2014-11-08 09:46:20 +01:00
Glenn Morris
83bad90efe Add 24.4 release ChangeLog entries 2014-10-20 20:21:15 +01:00
Glenn Morris
e694e2a9b0 package-test tweaks for hydra
* test/automated/package-test.el (with-package-test, package-test-signed):
Also set HOME to a temp value, in case the real one is absent (e.g.
hydra) or read-only. 
(package-test-signed): Use skip-unless rather than expected-result.

Fixes: debbugs:18575
2014-10-01 19:24:28 -04:00
Fabián Ezequiel Gallina
0e4c8f1856 * lisp/progmodes/python.el (python-indent-post-self-insert-function):
Avoid electric colon at beginning-of-defun. 

* test/automated/python-tests.el:
(python-indent-electric-colon-1): New test.  (Bug#18228)
2014-09-01 19:51:46 -03:00
Glenn Morris
ca8a1945a6 * python-tests.el (python-shell-calculate-exec-path-2): Update test
for today's python.el changes.
2014-08-18 15:15:06 -04:00
Glenn Morris
f314e84fce Revert 2013-01-31 change that decides coding system before backing up
It causes a more serious problem than the one it solves.
This closes bug#18141, and reopens bug#13522.

* lisp/files.el (basic-save-buffer-2): Revert 2013-01-31 change.

* src/fileio.c: Revert 2013-01-31 change.
(choose_write_coding_system): No longer callable from Lisp.
Move last piece back here from Fwrite_region.
(Fwrite_region, syms_of_fileio): Update for above changes.

* test/automated/data/files-bug18141.el.gz: New file.
* test/automated/files.el (files-test-bug-18141-file):
New variable and test.
2014-08-10 17:38:19 -07:00
Glenn Morris
6df16fba2a * test/automated/Makefile.in (check-tar): Remove, no longer needed.
No need to merge this to trunk.
2014-08-06 17:08:57 -07:00
Glenn Morris
f91d04c6fe * test/automated/Makefile.in (check-tar): Add as alias for check.
Do not merge this to trunk.
2014-08-02 23:52:00 -04:00
Fabián Ezequiel Gallina
b06a0dff84 Make python.el work with IPython automatically.
* 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
2014-07-20 15:12:30 -03:00
Fabián Ezequiel Gallina
d949ade3c1 Autodetect Python shell prompts.
* 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.
2014-07-19 10:13:07 -03:00
Fabián Ezequiel Gallina
fded0b4a15 Fix dedenters and electric colon handling.
* 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
2014-07-09 00:55:53 -03:00
Fabián Ezequiel Gallina
3acd6262d9 * lisp/progmodes/python.el (python-indent-post-self-insert-function):
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)
2014-07-01 00:54:11 -03:00
Leo Liu
39ef0f7495 * test/automated/calc-tests.el: New file and add tests for math-bignum.
Fixes: debbugs:17556
2014-06-28 10:15:13 +08:00
Michael Albinus
453cac385f * automated/dbus-tests.el (dbus--test-register-service)
(dbus-test02-register-service-session): Replace `dbus-ping' calls
by `dbus-list-known-names'.

Fixes: debbugs:17858
2014-06-27 20:20:21 +02:00
Stefan Monnier
30a42a5bed * test/automated/package-test.el (package-test-update-listing)
(package-test-update-archives, package-test-describe-package):
Adjust tests according to new package-list-unsigned.
2014-06-25 17:59:28 -04:00
Fabián Ezequiel Gallina
656f99beeb Fix completion retrieval parsing.
* 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
2014-06-21 11:14:54 -03:00
Michael Albinus
22a949d699 Revert last patch. The problem happens in the trunk. 2014-06-01 12:38:09 +02:00
Michael Albinus
7a458be33c * automated/tramp-tests.el (tramp-test29-vc-registered):
Instrument failed test case.
2014-06-01 11:33:24 +02:00
Glenn Morris
b2a929a2e6 test/automated/vc-bzr.el: revise previous change
* test/automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781)
(vc-bzr-test-faulty-bzr-autoloads):
Give bzr a temporary home-directory, in case the real one is missing.
Simply disabling logging wasn't enough.
2014-05-07 23:58:46 -07:00
Glenn Morris
606695a678 test/automated/vc-bzr.el: disable bzr's logging
This is for systems like hydra, where HOME can be read-only/absent.
See e.g. <http://hydra.nixos.org/build/10870893>.

* test/automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781)
(vc-bzr-test-faulty-bzr-autoloads): Disable bzr logging.
2014-05-07 20:34:20 -07:00
Dmitry Gutov
4dd3c4d53a * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Backtrack one char if the global/char-literal var matcher hits
inside a string.  The next char could be the beginning of an
expression expansion.

* test/automated/ruby-mode-tests.el
(ruby-interpolation-after-dollar-sign): New test.
2014-05-06 03:18:18 +04:00
Glenn Morris
6da8d06975 * lisp/help-fns.el (describe-function-1): Test for an autoload before a macro
since `macrop' works on autoloads. 

* test/automated/help-fns.el: New file.

Fixes: debbugs:17410
2014-05-05 17:33:07 -04:00
Michael Albinus
844465d6ca * automated/tramp-tests.el (top):
* automated/file-notify-tests.el (top): Do not disable interactive
passwords in batch mode.
(password-cache-expiry): Set to nil.
2014-04-25 12:35:01 +02:00
Michael Albinus
c0b9bc72cc Use a mock-up connection method for remote files.
* automated/file-notify-tests.el
(file-notify-test-remote-temporary-file-directory):
* automated/tramp-tests.el (tramp-test-temporary-file-directory):
Use a mock-up method as default.
(tramp-test00-availability): Print the used directory name.
(tramp-test33-recursive-load): Fix typo.
2014-04-24 10:21:58 +02:00
Michael Albinus
d5ff4ded7a * automated/tramp-tests.el (tramp--test-check-files): Remove traces. 2014-04-22 12:52:08 +02:00
Michael Albinus
84b2095cba * automated/tramp-tests.el (tramp-test30-special-characters):
Remove test for backslash.
2014-04-22 09:50:58 +02:00
Michael Albinus
f3a4812cf2 * automated/tramp-tests.el (tramp-test19-directory-files-and-attributes)
(tramp-test22-file-times): Check for `file-attributes' equality
only if there is a usable timestamp.
(tramp--test-check-files): Do not use `copy-sequence'.
2014-04-20 23:39:43 +02:00
Michael Albinus
5305137ad6 * automated/tramp-tests.el (tramp--test-check-files): Extend test.
(tramp-test31-utf8): Let-bind also `file-name-coding-system'.
2014-04-19 16:14:26 +02:00
Michael Albinus
2a2e6726d1 * automated/tramp-tests.el (tramp-copy-size-limit): Set to nil.
(tramp--test-make-temp-name): Optional argument LOCAL.
(tramp--instrument-test-case): Show messages.  Catch also `quit'.
(tramp-test10-write-region): No special test for out-of-band copy
needed anymore.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test21-file-links): Extend tests.
(tramp-test20-file-modes): More robust check for user "root".
(tramp--test-check-files): New defun.
(tramp-test30-special-characters, tramp-test33-recursive-load)
(tramp-test34-unload): New tests.
(tramp-test31-utf8, tramp-test32-asynchronous-requests):  Rename.
2014-04-18 20:58:13 +02:00
Paul Eggert
10ee3b3f17 Spelling fixes.
* automated/electric-tests.el: Fix spelling error in test name.
(whitespace-skipping-for-quotes-not-outside):
Rename from whitespace-skipping-for-quotes-not-ouside.
2014-04-10 12:12:34 -07:00
Glenn Morris
50c9a9b8a8 Fix python-triple-quote-pairing test
* test/automated/python-tests.el (python-triple-quote-pairing):
Enable/disable electric-pair-mode as needed.
2014-04-08 21:50:29 -04:00