current-buffer?
Hi,
I want to add some menu items of my own to the LWM4.3 editor's context
menu. They appear as I would expect using the
capi:pane-popup-menu-items -method.
However, when I try to insert some text in the 'editor:current-buffer'
it seems that the string is inserted in some other buffer instead the
one I am working with.
In my experience this seems to apply to interface menus as well, not
just the context menu.
Should I be doing something differently? Anybody tried this?
(defmethod capi:pane-popup-menu-items ((self capi:editor-pane)
(interface LISPWORKS-TOOLS:EDITOR))
(list*
(make-instance 'capi:menu :title "Buffers"
:items
(list (make-instance 'capi:menu-item
:title "Current Buffer String"
:callback-type :none
:selection-callback #'(lambda()
(editor:insert-string
(editor:current-point)
(format () ";;;; Current buffer: ~a" (editor:current-buffer)))))))
(call-next-method)))
Regards,
Mika