1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-22 10:26:20 +00:00
Commit Graph

517 Commits

Author SHA1 Message Date
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
Stefan Monnier
c08684513a * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Slash after
&, |, +, - and * can't be a division.

Fixes: debbugs:17317
2014-04-22 21:56:18 -04: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
Stefan Monnier
622eef687c * lisp/emacs-lisp/cl-macs.el (cl--loop-let): Avoid `nil' as var name. 2014-04-21 17:18:12 -04: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
ca2e9fb306 Instrument `tramp--test-check-files' in order to get traces on hydra. 2014-04-19 23:05:30 +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
Stefan Monnier
b262bde327 * lisp/nxml/nxml-mode.el (nxml-fontify-matcher): Make sure propertization
was done.
* lisp/nxml/xmltok.el (xmltok-scan-after-comment-open): Extend unclosed
comment to EOB.

Fixes: debbugs:17264
2014-04-16 11:28:26 -04: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
Feng Li
39764caa7f * lisp/progmodes/pascal.el (pascal-font-lock-keywords): Fix incorrect format
entry; use symbol boundaries to avoid mis-matches.
2014-04-10 09:56:28 -04: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
Glenn Morris
3b7fab2504 * electric-tests.el (electric-pair-backspace-1): Replace deleted function. 2014-04-08 21:34:16 -04:00
Glenn Morris
c17a8019bf ChangeLog fix (no need to merge to trunk) 2014-04-07 17:15:45 -04:00
João Távora
190f899aed Improve on previous quote autopairing change
Backported from trunk 2014-04-04T23:31:02Z!joaotavora@gmail.com

* lisp/elec-pair.el:
(electric-pair--syntax-ppss): When inside comments parse from
comment beginning.
(electric-pair--balance-info): Fix typo in comment.
(electric-pair--in-unterminated-string-p): Delete.
(electric-pair--unbalanced-strings-p): New function.
(electric-pair-string-bound-function): New var.
(electric-pair-inhibit-if-helps-balance): Decide quote pairing
according to `electric-pair--in-unterminated-string-p'

* test/automated/electric-tests.el (define-electric-pair-test): Don't
overtest..
(inhibit-in-mismatched-string-inside-ruby-comments): New test.
(inhibit-in-mismatched-string-inside-c-comments): New test.
2014-04-07 08:29:50 +01:00
João Távora
528c33b528 Inhibit quote autopairing more frequently
Backported from trunk 2014-04-02T09:59:06Z!joaotavora@gmail.com

* lisp/elec-pair.el (electric-pair-inhibit-if-helps-balance): Inhibit
quote pairing if point-max is inside an unterminated string.
(electric-pair--looking-at-unterminated-string-p):
Delete.
(electric-pair--in-unterminated-string-p): New function.

* test/automated/electric-tests.el (inhibit-if-strings-mismatched):
New test, change from `inhibit-only-of-next-is-mismatched'.
2014-04-07 08:24:03 +01:00
João Távora
7aecc2f6ca Fix triple-quoting electricity in python-mode
* 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
2014-04-07 00:23:45 +01:00
João Távora
89f20f76d8 Fix electric-pair-skip-whitespace with quotes in text-mode
* lisp/elec-pair.el (electric-pair-post-self-insert-function): Don't
skip whitespace for quote syntax when `electric-pair-text-pairs'
and `electric-pair-pairs' were used.

* test/automated/electric-tests.el (electric-pair-define-test-form):
More readable test docstrings.
(whitespace-skipping-for-quotes-not-ouside)
(whitespace-skipping-for-quotes-only-inside)
(whitespace-skipping-not-without-proper-syntax):

Fixes: debbugs:17183
2014-04-07 00:09:19 +01:00
Stefan Monnier
062e286b7c * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $'
used as a variable.

Fixes: debbugs:17174
2014-04-02 20:41:09 -04:00