aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThien-Thi Nguyen2006-05-08 08:02:25 +0000
committerThien-Thi Nguyen2006-05-08 08:02:25 +0000
commitb1c36c0fc76a33bda05dbea30b3b18e569315ada (patch)
treee50f9899ed386efadf08748cc576f3a252fad9f1
parent76a25e793682c3c59084c99b5577443bbd786a41 (diff)
downloademacs-b1c36c0fc76a33bda05dbea30b3b18e569315ada.tar.gz
emacs-b1c36c0fc76a33bda05dbea30b3b18e569315ada.zip
(ewoc--set-buffer-bind-dll-let*): Use `with-current-buffer'.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/ewoc.el12
2 files changed, 9 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4d6708c8a35..385bf640a7c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12006-05-08 Thien-Thi Nguyen <ttn@gnu.org>
2
3 * emacs-lisp/ewoc.el (ewoc--set-buffer-bind-dll-let*):
4 Use with-current-buffer.
5
12006-05-07 Kim F. Storm <storm@cua.dk> 62006-05-07 Kim F. Storm <storm@cua.dk>
2 7
3 * subr.el (add-to-history): Remove keep-dups arg. 8 * 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*.
221dll will be bound when VARLIST is initialized, but the current 221dll will be bound when VARLIST is initialized, but the current
222buffer will *not* have been changed. 222buffer will *not* have been changed.
223Return value of last form in FORMS." 223Return value of last form in FORMS."
224 (let ((old-buffer (make-symbol "old-buffer")) 224 (let ((hnd (make-symbol "ewoc")))
225 (hnd (make-symbol "ewoc"))) 225 `(let* ((,hnd ,ewoc)
226 `(let* ((,old-buffer (current-buffer))
227 (,hnd ,ewoc)
228 (dll (ewoc--dll ,hnd)) 226 (dll (ewoc--dll ,hnd))
229 ,@varlist) 227 ,@varlist)
230 (set-buffer (ewoc--buffer ,hnd)) 228 (with-current-buffer (ewoc--buffer ,hnd)
231 (unwind-protect 229 ,@forms))))
232 (progn ,@forms)
233 (set-buffer ,old-buffer)))))
234 230
235(defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms) 231(defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms)
236 `(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms)) 232 `(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms))