Download LPEX Editor User's Guide

Transcript
/* Macro file 'delempty.lx'
/* Find and remove leading empty lines
'mark set predel'
/* Save the cursor position for later use
'top'
/* move cursor to first line in file
'extract content'
/* get contents of first line
do while (content='')
/* loop while empty lines found
'block mark element'
/* highlight empty lines
'next element'
/* move cursor to next line
'extract content'
/* get contents of next line
end
'block delete'
/* delete marked block
'mark find predel' /* Restore cursor position if still existing
'mark clear predel' /* Clear mark saving the cursor position
exit 0
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
a. To run the callback routine called del_empt.lx each time you request the
pop-up menu, type:
set popupinit del_empt.lx
b. To remove the callback routine called del_empt.lx from the pop-up
menu callback list, type:
set popupinit drop del_empt.lx
API Return Code
None.
“popuplink Parameter”
“popupmenu Parameter” on page 290
“popupmenuid Parameter” on page 293
“popupmenulist Parameter” on page 294
popuplink Parameter
Add menu items already defined on the menu bar to the pop-up menu in the
Editor window.
Scope: File
Syntax
set popuplink.Id[Item][.SubItem][...] [Ordinal]
Options
Id
Item
Either the predefined Editor name for an Editor-defined pop-up menu
item, or a numeric value for a user-added item. The numeric value can
be obtained by querying the popupmenuid parameter.
Pop-up menu item to which the new menu item should be linked.
Chapter 8. References
289