(ewoc--set-buffer-bind-dll-let*): Use `with-current-buffer'.
This commit is contained in:
parent
76a25e7936
commit
b1c36c0fc7
2 changed files with 9 additions and 8 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue