diff options
| author | Grégoire Jadi | 2013-06-24 10:22:45 +0200 |
|---|---|---|
| committer | Grégoire Jadi | 2013-06-24 10:22:45 +0200 |
| commit | da95bc007d161d6d901b7600120a97fd2f54ce4b (patch) | |
| tree | 1a1ac334d23acedd4dd97cea4066537c67a36cdc /src/xwidget.h | |
| parent | d65ea7dd1d4aa93a44c39a44d0e79fca6e912690 (diff) | |
| download | emacs-da95bc007d161d6d901b7600120a97fd2f54ce4b.tar.gz emacs-da95bc007d161d6d901b7600120a97fd2f54ce4b.zip | |
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.
Diffstat (limited to 'src/xwidget.h')
| -rw-r--r-- | src/xwidget.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xwidget.h b/src/xwidget.h index 3ca9dbe0e1a..530b087796c 100644 --- a/src/xwidget.h +++ b/src/xwidget.h | |||
| @@ -107,4 +107,6 @@ struct xwidget* lookup_xwidget (Lisp_Object spec); | |||
| 107 | #define XG_XWIDGET "emacs_xwidget" | 107 | #define XG_XWIDGET "emacs_xwidget" |
| 108 | #define XG_XWIDGET_VIEW "emacs_xwidget_view" | 108 | #define XG_XWIDGET_VIEW "emacs_xwidget_view" |
| 109 | void xwidget_view_delete_all_in_window( struct window *w ); | 109 | void xwidget_view_delete_all_in_window( struct window *w ); |
| 110 | |||
| 111 | void kill_buffer_xwidgets (Lisp_Object buffer); | ||
| 110 | #endif /* XWIDGET_H_INCLUDED */ | 112 | #endif /* XWIDGET_H_INCLUDED */ |