summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2006-05-08 08:02:25 +0000
committerThien-Thi Nguyen <ttn@gnuvola.org>2006-05-08 08:02:25 +0000
commitb1c36c0fc76a33bda05dbea30b3b18e569315ada (patch)
treee50f9899ed386efadf08748cc576f3a252fad9f1 /lisp/emacs-lisp
parent76a25e793682c3c59084c99b5577443bbd786a41 (diff)
downloademacs-b1c36c0fc76a33bda05dbea30b3b18e569315ada.tar.gz
emacs-b1c36c0fc76a33bda05dbea30b3b18e569315ada.tar.bz2
emacs-b1c36c0fc76a33bda05dbea30b3b18e569315ada.zip
(ewoc--set-buffer-bind-dll-let*): Use `with-current-buffer'.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/ewoc.el12
1 files changed, 4 insertions, 8 deletions
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))