1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

536 Commits

Author SHA1 Message Date
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
Michael Albinus
7a458be33c * automated/tramp-tests.el (tramp-test29-vc-registered):
Instrument failed test case.
2014-06-01 11:33:24 +02:00
Stefan Monnier
15ad4013c4 * lisp/emacs-lisp/nadvice.el (advice--member-p): Change second arg.
(advice-function-member-p): Tell it to check both names and functions.
(advice--add-function): Adjust call accordingly.

Fixes: debbugs:17531
2014-05-23 12:17:14 -04:00
Stefan Monnier
5d03fb436f * lisp/emacs-lisp/nadvice.el: Support adding a given function multiple times.
(advice--member-p): If name is given, only compare the name.
(advice--remove-function): Don't stop at the first match.
(advice--normalize-place): New function.
(add-function, remove-function): Use it.
(advice--add-function): Pass the name, if any, to
advice--remove-function.
2014-05-10 16:07:01 -04:00
Glenn Morris
833737d71e * test/automated/vc-bzr.el: Tweak previous to use BZR_HOME rather than HOME 2014-05-08 00:23:40 -07:00
Glenn Morris
1b70208568 Fix comment typo in previous 2014-05-08 00:14:15 -07: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