Lisp HUG Maillist Archive

highlighted editor region

I'm trying to write an editor command that has a different behavior 
depending on the highlighted text. But I can't seem to distinguish the 
case where there is no highlighted text -- just the current point. All 
the editor functions seem to use whatever mark was previously set even 
though there is no highlighted text in the buffer. Is there a way to 
determine when there is no highlighted text?

Thanks,

John DeSoi, Ph.D.


Re: highlighted editor region

Hello John,

| I'm trying to write an editor command that has a different behavior 
| depending on the highlighted text. But I can't seem to distinguish the 
| case where there is no highlighted text -- just the current point. All 
| the editor functions seem to use whatever mark was previously set even 
| though there is no highlighted text in the buffer. Is there a way to 
| determine when there is no highlighted text?

I naively hope that the following do the trick :-)

(editor:variable-value-if-bound 'editor:highlight-active-region
                                          :buffer buffer)
--
HTH,
Dmitri Ivanov
lisp.ystok.ru


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