Set delete slot in ein:notification-setup

This commit is contained in:
Takafumi Arakaki 2012-10-09 23:25:34 +02:00
parent 03a8b008d3
commit 0d86295cf4
2 changed files with 9 additions and 3 deletions

View file

@ -512,7 +512,9 @@ This is equivalent to do ``C-c`` in the console program."
#'ein:worksheet-name #'ein:worksheet-name
(lambda (ws) (lambda (ws)
(ein:notebook-worksheet--render-maybe ein:%notebook% ws "clicked") (ein:notebook-worksheet--render-maybe ein:%notebook% ws "clicked")
(ein:worksheet-buffer ws))) (ein:worksheet-buffer ws))
(lambda (ws)
(ein:notebook-worksheet-delete ein:%notebook% ws t)))
(ein:notebook-setup-kill-buffer-hook) (ein:notebook-setup-kill-buffer-hook)
(ein:notebook-set-buffer-file-name-maybe notebook) (ein:notebook-set-buffer-file-name-maybe notebook)
(setq ein:%notebook% notebook))) (setq ein:%notebook% notebook)))

View file

@ -153,7 +153,7 @@ where NS is `:kernel' or `:notebook' slot of NOTIFICATION."
packed))) packed)))
(defun ein:notification-setup (buffer events get-list get-current get-name (defun ein:notification-setup (buffer events get-list get-current get-name
get-buffer) get-buffer delete)
"Setup a new notification widget in the BUFFER. "Setup a new notification widget in the BUFFER.
This function saves the new notification widget instance in the This function saves the new notification widget instance in the
local variable of the BUFFER. local variable of the BUFFER.
@ -171,6 +171,9 @@ GET-NAME : function
GET-BUFFER : function GET-BUFFER : function
Get a buffer of given worksheet. Render it if needed. Get a buffer of given worksheet. Render it if needed.
DELETE : function
Remove a given worksheet.
" "
(with-current-buffer buffer (with-current-buffer buffer
(setq ein:%notification% (setq ein:%notification%
@ -182,7 +185,8 @@ GET-BUFFER : function
:get-list get-list :get-list get-list
:get-current get-current :get-current get-current
:get-name get-name :get-name get-name
:get-buffer get-buffer)) :get-buffer get-buffer
:delete delete))
ein:%notification%)) ein:%notification%))