]> git.eshelyaron.com Git - emacs.git/commit
Handle xwidgets like processes and delete them when their buffer is killed.
authorGrégoire Jadi <gregoire.jadi@gmail.com>
Mon, 24 Jun 2013 08:22:45 +0000 (10:22 +0200)
committerGrégoire Jadi <gregoire.jadi@gmail.com>
Mon, 24 Jun 2013 08:22:45 +0000 (10:22 +0200)
commitda95bc007d161d6d901b7600120a97fd2f54ce4b
tree1a1ac334d23acedd4dd97cea4066537c67a36cdc
parentd65ea7dd1d4aa93a44c39a44d0e79fca6e912690
Handle xwidgets like processes and delete them when their buffer is killed.

* lisp/xwidget.el (xwidget-kill-buffer-query-function): New function to
query a user before killing a buffer with xwidgets in it.

This function is stored in `kill-buffer-query-functions' and called from
`kill-buffer'.
* src/buffer.c (Fkill_buffer): Call `kill_buffer_xwidgets'.
* src/xwidget.c (kill_buffer_xwidgets): Delete xwidgets attached to the
specified buffer.
* src/xwidget.h (kill_buffer_xwidgets): Add definition.
lisp/xwidget.el
src/buffer.c
src/xwidget.c
src/xwidget.h