Lisp HUG Maillist Archive

Editor command not working on delivery level 5

Hello lispworkers,

I define the following command to handle pressing the Delete key.

(defcommand "Delete Character or Selection" (p)
     "Delete (not kill!) the region if it is highlighted otherwise
 next character" ""
  (cond ((variable-value-if-bound "Highlight Active Region"
              :buffer (current-buffer))
         (delete-region-command p)
         (set-highlight-buffer-region nil))
        (t
         (delete-next-character-command p))))

(bind-key "Delete Character or Selection" #\Delete)

This works fine in IDE and in an application delivered on level 4.
However on level 5, delete-next-character-command seems always to be
invoked.

I usually specify the following arguments to the deliver function:
  :keep-editor t
  :editor-commands-to-keep :simple-editor

I have also tried (unsuccessfully)
  :editor-commands-to-keep '("Delete Character or Selection")

Any takers?
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru


Re: Editor command not working on delivery level 5

Dmitriy Ivanov wrote:
> I usually specify the following arguments to the deliver function:
>   :keep-editor t
>   :editor-commands-to-keep :simple-editor
> 
> I have also tried (unsuccessfully)
>   :editor-commands-to-keep '("Delete Character or Selection")
> 

I'm assuming that your command and key binding are being saved properly 
in the delivered image.  Does using :keep-symbol-names 
'(editor::highlight-active-region) work?  What about 
:packages-to-keep-symbol-names '("EDITOR")?


Mike


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