master 3eba2d37eef 2/2: ; Simplify last change.

Sean Whitton <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: master
commit 3eba2d37eef543fbc9ba89ad2d21ad4eba2a7069
Author: Sean Whitton <[email protected]>
Commit: Sean Whitton <[email protected]>

    ; Simplify last change.
---
 test/src/buffer-tests.el | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el
index ba7a683c365..630dda80783 100644
--- a/test/src/buffer-tests.el
+++ b/test/src/buffer-tests.el
@@ -1480,15 +1480,13 @@ Test both rear-advance and non-rear-advance overlays."
 (ert-deftest test-make-indirect-buffer-clone-hook ()
   (let ((base-buf (generate-new-buffer "base")))
     (unwind-protect
-        (progn
-          (with-current-buffer base-buf
-            (insert "sample text"))
+        (save-current-buffer
           (set-buffer base-buf)
+          (insert "sample text")
           (let ((clone-indirect-buffer-hook
                  (list (lambda ()
                          (error "clone hook error")))))
-            (should-error
-             (make-indirect-buffer base-buf "indirect" t)))
+            (should-error (make-indirect-buffer base-buf "indirect" t)))
           (should (eq (current-buffer) base-buf)))
       (ignore-errors (kill-buffer "indirect"))
       (when (buffer-live-p base-buf)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.