Fix possible wrong context when killing buffers

* exwm-manage.el (exwm-manage--unmanage-window): Make sure to use the
correct context to read/set buffer-local variables when killing
buffers.
This commit is contained in:
Chris Feng 2017-11-24 22:43:16 +08:00
parent 71a39840b2
commit 589b840409

View file

@ -405,11 +405,12 @@ manager is shutting down."
(xcb:flush exwm--connection))
(let ((kill-buffer-func
(lambda (buffer)
(let ((kill-buffer-query-functions nil))
(when exwm--floating-frame
(when (buffer-local-value 'exwm--floating-frame buffer)
(select-window
(frame-selected-window exwm-workspace--current)))
(kill-buffer buffer)))))
(with-current-buffer buffer
(let ((kill-buffer-query-functions nil))
(kill-buffer buffer))))))
(exwm--defer 0 kill-buffer-func buffer)
(when (active-minibuffer-window)
(exit-minibuffer))))))