From: Thien-Thi Nguyen Date: Mon, 8 May 2006 08:02:25 +0000 (+0000) Subject: (ewoc--set-buffer-bind-dll-let*): Use `with-current-buffer'. X-Git-Tag: emacs-pretest-22.0.90~2680 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b1c36c0fc76a33bda05dbea30b3b18e569315ada;p=emacs.git (ewoc--set-buffer-bind-dll-let*): Use `with-current-buffer'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4d6708c8a35..385bf640a7c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-08 Thien-Thi Nguyen + + * emacs-lisp/ewoc.el (ewoc--set-buffer-bind-dll-let*): + Use with-current-buffer. + 2006-05-07 Kim F. Storm * subr.el (add-to-history): Remove keep-dups arg. diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 74931c3c34a..278ffe6e7ca 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -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))