diff options
| author | Eli Zaretskii | 2023-02-13 20:11:28 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-02-13 20:11:28 +0200 |
| commit | 3d572ae0d507bba07f3cfc5ae2d2c7dd4937472c (patch) | |
| tree | ddff8ab3f26f07bcb3694a7a5493871a9410ca85 /test/src/buffer-tests.el | |
| parent | dd8b720ee74e72359eb174aa5a27ab1770a349bd (diff) | |
| download | emacs-3d572ae0d507bba07f3cfc5ae2d2c7dd4937472c.tar.gz emacs-3d572ae0d507bba07f3cfc5ae2d2c7dd4937472c.zip | |
Rename with/without-narrowing to with/without-restriction
* doc/lispref/commands.texi:
* doc/lispref/display.texi:
* doc/lispref/positions.texi:
* etc/NEWS:
* lisp/subr.el:
* src/buffer.c:
* src/editfns.c:
* src/keyboard.c:
* src/xdisp.c:
* test/src/buffer-tests.el: Rename with-narrowing and
without-narrowing to with-restriction and without-restriction.
Likewise with internal--with-narrowing and
internal--without-narrowing. All callers and documentation
changed.
Diffstat (limited to 'test/src/buffer-tests.el')
| -rw-r--r-- | test/src/buffer-tests.el | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el index 0ae78c8d9d9..45914b2b6b0 100644 --- a/test/src/buffer-tests.el +++ b/test/src/buffer-tests.el | |||
| @@ -8540,12 +8540,12 @@ Finally, kill the buffer and its temporary file." | |||
| 8540 | ))) | 8540 | ))) |
| 8541 | 8541 | ||
| 8542 | (ert-deftest test-labeled-narrowing () | 8542 | (ert-deftest test-labeled-narrowing () |
| 8543 | "Test `with-narrowing' and `without-narrowing'." | 8543 | "Test `with-restriction' and `without-restriction'." |
| 8544 | (with-current-buffer (generate-new-buffer " foo" t) | 8544 | (with-current-buffer (generate-new-buffer " foo" t) |
| 8545 | (insert (make-string 5000 ?a)) | 8545 | (insert (make-string 5000 ?a)) |
| 8546 | (should (= (point-min) 1)) | 8546 | (should (= (point-min) 1)) |
| 8547 | (should (= (point-max) 5001)) | 8547 | (should (= (point-max) 5001)) |
| 8548 | (with-narrowing | 8548 | (with-restriction |
| 8549 | 100 500 :label 'foo | 8549 | 100 500 :label 'foo |
| 8550 | (should (= (point-min) 100)) | 8550 | (should (= (point-min) 100)) |
| 8551 | (should (= (point-max) 500)) | 8551 | (should (= (point-max) 500)) |
| @@ -8564,11 +8564,11 @@ Finally, kill the buffer and its temporary file." | |||
| 8564 | (narrow-to-region 400 1000) | 8564 | (narrow-to-region 400 1000) |
| 8565 | (should (= (point-min) 400)) | 8565 | (should (= (point-min) 400)) |
| 8566 | (should (= (point-max) 500)) | 8566 | (should (= (point-max) 500)) |
| 8567 | (without-narrowing | 8567 | (without-restriction |
| 8568 | :label 'bar | 8568 | :label 'bar |
| 8569 | (should (= (point-min) 100)) | 8569 | (should (= (point-min) 100)) |
| 8570 | (should (= (point-max) 500))) | 8570 | (should (= (point-max) 500))) |
| 8571 | (without-narrowing | 8571 | (without-restriction |
| 8572 | :label 'foo | 8572 | :label 'foo |
| 8573 | (should (= (point-min) 1)) | 8573 | (should (= (point-min) 1)) |
| 8574 | (should (= (point-max) 5001))) | 8574 | (should (= (point-max) 5001))) |
| @@ -8577,18 +8577,18 @@ Finally, kill the buffer and its temporary file." | |||
| 8577 | (widen) | 8577 | (widen) |
| 8578 | (should (= (point-min) 100)) | 8578 | (should (= (point-min) 100)) |
| 8579 | (should (= (point-max) 500)) | 8579 | (should (= (point-max) 500)) |
| 8580 | (with-narrowing | 8580 | (with-restriction |
| 8581 | 50 250 :label 'bar | 8581 | 50 250 :label 'bar |
| 8582 | (should (= (point-min) 100)) | 8582 | (should (= (point-min) 100)) |
| 8583 | (should (= (point-max) 250)) | 8583 | (should (= (point-max) 250)) |
| 8584 | (widen) | 8584 | (widen) |
| 8585 | (should (= (point-min) 100)) | 8585 | (should (= (point-min) 100)) |
| 8586 | (should (= (point-max) 250)) | 8586 | (should (= (point-max) 250)) |
| 8587 | (without-narrowing | 8587 | (without-restriction |
| 8588 | :label 'bar | 8588 | :label 'bar |
| 8589 | (should (= (point-min) 100)) | 8589 | (should (= (point-min) 100)) |
| 8590 | (should (= (point-max) 500)) | 8590 | (should (= (point-max) 500)) |
| 8591 | (without-narrowing | 8591 | (without-restriction |
| 8592 | :label 'foo | 8592 | :label 'foo |
| 8593 | (should (= (point-min) 1)) | 8593 | (should (= (point-min) 1)) |
| 8594 | (should (= (point-max) 5001))) | 8594 | (should (= (point-max) 5001))) |
| @@ -8598,39 +8598,39 @@ Finally, kill the buffer and its temporary file." | |||
| 8598 | (should (= (point-max) 250))) | 8598 | (should (= (point-max) 250))) |
| 8599 | (should (= (point-min) 100)) | 8599 | (should (= (point-min) 100)) |
| 8600 | (should (= (point-max) 500)) | 8600 | (should (= (point-max) 500)) |
| 8601 | (with-narrowing | 8601 | (with-restriction |
| 8602 | 50 250 :label 'bar | 8602 | 50 250 :label 'bar |
| 8603 | (should (= (point-min) 100)) | 8603 | (should (= (point-min) 100)) |
| 8604 | (should (= (point-max) 250)) | 8604 | (should (= (point-max) 250)) |
| 8605 | (with-narrowing | 8605 | (with-restriction |
| 8606 | 150 500 :label 'baz | 8606 | 150 500 :label 'baz |
| 8607 | (should (= (point-min) 150)) | 8607 | (should (= (point-min) 150)) |
| 8608 | (should (= (point-max) 250)) | 8608 | (should (= (point-max) 250)) |
| 8609 | (without-narrowing | 8609 | (without-restriction |
| 8610 | :label 'bar | 8610 | :label 'bar |
| 8611 | (should (= (point-min) 150)) | 8611 | (should (= (point-min) 150)) |
| 8612 | (should (= (point-max) 250))) | 8612 | (should (= (point-max) 250))) |
| 8613 | (without-narrowing | 8613 | (without-restriction |
| 8614 | :label 'foo | 8614 | :label 'foo |
| 8615 | (should (= (point-min) 150)) | 8615 | (should (= (point-min) 150)) |
| 8616 | (should (= (point-max) 250))) | 8616 | (should (= (point-max) 250))) |
| 8617 | (without-narrowing | 8617 | (without-restriction |
| 8618 | :label 'baz | 8618 | :label 'baz |
| 8619 | (should (= (point-min) 100)) | 8619 | (should (= (point-min) 100)) |
| 8620 | (should (= (point-max) 250)) | 8620 | (should (= (point-max) 250)) |
| 8621 | (without-narrowing | 8621 | (without-restriction |
| 8622 | :label 'foo | 8622 | :label 'foo |
| 8623 | (should (= (point-min) 100)) | 8623 | (should (= (point-min) 100)) |
| 8624 | (should (= (point-max) 250))) | 8624 | (should (= (point-max) 250))) |
| 8625 | (without-narrowing | 8625 | (without-restriction |
| 8626 | :label 'bar | 8626 | :label 'bar |
| 8627 | (should (= (point-min) 100)) | 8627 | (should (= (point-min) 100)) |
| 8628 | (should (= (point-max) 500)) | 8628 | (should (= (point-max) 500)) |
| 8629 | (without-narrowing | 8629 | (without-restriction |
| 8630 | :label 'foobar | 8630 | :label 'foobar |
| 8631 | (should (= (point-min) 100)) | 8631 | (should (= (point-min) 100)) |
| 8632 | (should (= (point-max) 500))) | 8632 | (should (= (point-max) 500))) |
| 8633 | (without-narrowing | 8633 | (without-restriction |
| 8634 | :label 'foo | 8634 | :label 'foo |
| 8635 | (should (= (point-min) 1)) | 8635 | (should (= (point-min) 1)) |
| 8636 | (should (= (point-max) 5001))) | 8636 | (should (= (point-max) 5001))) |