/*
 * This macro displays a popup menu showing all lines in the file that are named
 * as a result of a SET POINT command. When a line is selected, that line becomes current.
 */
Trace o
lf = D2c(10)
'extract /line/point *'
If point.0 = 0 Then Call Abort 'No named lines exist'
line = ''
max_line = 0
max_name = 0
save_line = line.1
Do i = 1 To point.0
   If Length( Word( point.i, 1 ) ) > max_line Then max_line = Length( Word( point.i, 1 ) )
   If Length( Word( point.i, 2 ) ) > max_name Then max_name = Length( Word( point.i, 2 ) )
   ':'Word( point.i, 1 )
   'extract /curline'
   point.i = point.i curline.3
End
':'save_line
Do i = 1 To point.0
   line = line || Right( Word( point.i, 1 ), max_line ) Left( Word( point.i, 2 ), max_name) Subword( point.i, 3 ) || lf
End
'popup centre' lf || line
idx = popup.2
If idx \= 0 Then ':'Word( point.idx, 1 )
Return

Abort:
Parse Arg msg
'emsg' msg
exit 0
