Lisp HUG Maillist Archive

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


Re: current-buffer?

Unable to parse email body. Email id is 1770

Updated at: 2020-12-10 08:58 UTC