diff options
| author | Joao Tavora | 2014-12-14 11:22:46 +0000 |
|---|---|---|
| committer | Joao Tavora | 2014-12-14 11:22:46 +0000 |
| commit | bb57c94d5f047cde106ffa71bf59f24b2b3027b8 (patch) | |
| tree | 90bcb89e16d1fef22bd06d8035ac0797b11def88 /test | |
| parent | 7b945728d3db91732ace3d3a1cb1c4bdea444b2c (diff) | |
| download | emacs-bb57c94d5f047cde106ffa71bf59f24b2b3027b8.tar.gz emacs-bb57c94d5f047cde106ffa71bf59f24b2b3027b8.zip | |
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.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 5 | ||||
| -rw-r--r-- | test/automated/electric-tests.el | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 442e802a1bb..a117834cd34 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-12-14 João Távora <joaotavora@gmail.com> | ||
| 2 | |||
| 3 | * automated/electric-tests.el (autowrapping-7): Tests for | ||
| 4 | tex-mode. | ||
| 5 | |||
| 1 | 2014-12-13 Glenn Morris <rgm@gnu.org> | 6 | 2014-12-13 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * automated/flymake/warnpred/test.pl: Tweak format, since the | 8 | * automated/flymake/warnpred/test.pl: Tweak format, since the |
diff --git a/test/automated/electric-tests.el b/test/automated/electric-tests.el index b1908e6bb32..cd07213bf20 100644 --- a/test/automated/electric-tests.el +++ b/test/automated/electric-tests.el | |||
| @@ -60,7 +60,7 @@ | |||
| 60 | (cl-progv | 60 | (cl-progv |
| 61 | (mapcar #'car bindings) | 61 | (mapcar #'car bindings) |
| 62 | (mapcar #'cdr bindings) | 62 | (mapcar #'cdr bindings) |
| 63 | (self-insert-command 1)))) | 63 | (call-interactively (key-binding `[,last-command-event]))))) |
| 64 | (should (equal (buffer-substring-no-properties (point-min) (point-max)) | 64 | (should (equal (buffer-substring-no-properties (point-min) (point-max)) |
| 65 | expected-string)) | 65 | expected-string)) |
| 66 | (should (equal (point) | 66 | (should (equal (point) |
| @@ -575,5 +575,14 @@ baz\"\"" | |||
| 575 | (skip-chars-backward "\"") | 575 | (skip-chars-backward "\"") |
| 576 | (mark-sexp -1))) | 576 | (mark-sexp -1))) |
| 577 | 577 | ||
| 578 | (define-electric-pair-test autowrapping-7 | ||
| 579 | "foo" "\"" :expected-string "``foo''" :expected-point 8 | ||
| 580 | :modes '(tex-mode) | ||
| 581 | :fixture-fn #'(lambda () | ||
| 582 | (electric-pair-mode 1) | ||
| 583 | (goto-char (point-max)) | ||
| 584 | (skip-chars-backward "\"") | ||
| 585 | (mark-sexp -1))) | ||
| 586 | |||
| 578 | (provide 'electric-tests) | 587 | (provide 'electric-tests) |
| 579 | ;;; electric-tests.el ends here | 588 | ;;; electric-tests.el ends here |