]> git.eshelyaron.com Git - emacs.git/commitdiff
(ewoc--set-buffer-bind-dll-let*): Use `with-current-buffer'.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Mon, 8 May 2006 08:02:25 +0000 (08:02 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Mon, 8 May 2006 08:02:25 +0000 (08:02 +0000)
lisp/ChangeLog
lisp/emacs-lisp/ewoc.el

index 4d6708c8a353ab7d576a5abf2aeedbfbd3a1f85d..385bf640a7cf1d1aadd4de5646a5bdd5bb2ab996 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-08  Thien-Thi Nguyen  <ttn@gnu.org>
+
+       * emacs-lisp/ewoc.el (ewoc--set-buffer-bind-dll-let*):
+       Use with-current-buffer.
+
 2006-05-07  Kim F. Storm  <storm@cua.dk>
 
        * subr.el (add-to-history): Remove keep-dups arg.
index 74931c3c34a14f9c05f2a5fec05ce314b00d56a7..278ffe6e7cad5192bd6a75c208e2495457684eb6 100644 (file)
@@ -221,16 +221,12 @@ dll bound to ewoc--dll, and VARLIST bound as in a let*.
 dll will be bound when VARLIST is initialized, but the current
 buffer will *not* have been changed.
 Return value of last form in FORMS."
-  (let ((old-buffer (make-symbol "old-buffer"))
-       (hnd (make-symbol "ewoc")))
-    `(let* ((,old-buffer (current-buffer))
-            (,hnd ,ewoc)
+  (let ((hnd (make-symbol "ewoc")))
+    `(let* ((,hnd ,ewoc)
             (dll (ewoc--dll ,hnd))
             ,@varlist)
-      (set-buffer (ewoc--buffer ,hnd))
-      (unwind-protect
-           (progn ,@forms)
-        (set-buffer ,old-buffer)))))
+       (with-current-buffer (ewoc--buffer ,hnd)
+         ,@forms))))
 
 (defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms)
   `(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms))