1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-01 08:17:38 +00:00
Commit Graph

547 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
fd4e65e4ae Added missing test for previous commit 2015-01-27 00:35:07 -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
7b945728d3 * test/automated/flymake/warnpred/test.pl: Tweak earlier change. 2014-12-13 13:17:38 -08: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
Stefan Monnier
e3c24b171b * lisp/progmodes/sh-script.el: Fix indentation rule of "| while".
Fixes: debbugs:18031

* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Go back to the beginning
of the whole pipe when indenting an opening keyword after a |.
Generalize this treatment to opening keywords like "while".
2014-12-04 10:09:08 -05: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
Dmitry Gutov
c613f4d6c1 Fix indentation before !=' and after +='
Originally reported in https://github.com/mooz/js2-mode/issues/174.
* lisp/progmodes/js.el (js--indent-operator-re): Make assignments and
(in)equality operator a separate case.
(js--continued-expression-p): Escape the second `+' in the regexp.
2014-11-16 14:19:16 +02: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
Eric S. Raymond
cac77f92e3 Backport changes in preparation for git migration from trunk.
admin: Changes in several documents.
 autogen.sh: Neutralize language specific to a repository type.

 doc/misc/efaq-w32.texi: Neutralized language specific to a repository type.

 doc/misc/gnus-coding.txt: Neutralized language specific to a repository type.

 lisp/Makefile.in: Change some production names so they're neutral
 about the repository type.
2014-10-31 11:03:23 +02: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
Stefan Monnier
af86b05fd4 test/indent/scheme.scm: New file. 2014-09-02 16:47:44 -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
Paul Eggert
ad4c5263f5 Spelling fixes. 2014-07-21 07:41:19 -07: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
Stefan Monnier
d8899d09b9 * lisp/progmodes/sh-script.el (sh-smie-sh-rules): Don't align with a && in
the middle of a line.

Fixes: debbugs:17896
2014-07-08 14:38:07 -04: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
Glenn Morris
90f33ead9b * calc-test.el: Set copyright to FSF; standardize permissions notice 2014-06-27 20:11:24 -07: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
Stefan Monnier
370ceb2210 Fix some indentation problem with \; and pipes.
* lisp/progmodes/sh-script.el (sh-mode-syntax-table): Set syntax of ;|&.
(sh-smie--default-forward-token, sh-smie--default-backward-token):
New functions.
(sh-smie-sh-forward-token, sh-smie-sh-backward-token)
(sh-smie-rc-forward-token, sh-smie-rc-backward-token): Use them.
(sh-smie-sh-rules): Fix indentation of a pipe at BOL.

Fixes: debbugs:17842
2014-06-24 16:16:10 -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
Stefan Monnier
9e248ebdc7 * lisp/progmodes/sh-script.el (sh-smie-sh-rules): For { after &&, don't
align with the surrounding parent.

Fixes: debbugs:17721
2014-06-20 10:23:30 -04:00
Stefan Monnier
500dce5f4d * lisp/emacs-lisp/smie.el (smie--hanging-eolp-function): New var.
(smie-indent--hanging-p): Use it.
* lisp/progmodes/sh-script.el (sh-set-shell): Set it.

Fixes: debbugs:17621
2014-06-19 21:05:40 -04:00
Stefan Monnier
e9638b49e5 * lisp/progmodes/sh-script.el (sh-smie-sh-rules): Use same rule for && as
for |.

Fixes: debbugs:17621
2014-06-19 18:52:12 -04:00
Michael Albinus
22a949d699 Revert last patch. The problem happens in the trunk. 2014-06-01 12:38:09 +02:00
Michael Albinus
3340452bdc * tramp-tests.el (tramp-test29-vc-registered):
Instrument failed test case.
2014-06-01 11:33:57 +02:00