/*
 * > Quote.ced
 * >
 * > Turn the current block into an article quote.
 * >
 * > Author: Stefan Winterstein (winter@cs.uni-sb.de)
 * > Status: Public Domain
 *
 */

COMMENT = '> '
LF  = '0A'X

options results			/* Allow CygnusEd to pass status variables */

address 'rexx_ced'		/* Tell ARexx to talk to CygnusEd */

status 47				/* get current line number */
start = result

status 69				/* get start of block */
	end = result

if end = -1 then do		/* No block marked */
	end = start+1
end
else do
	'mark block'		/* turn bock marking off */
end


if start > end then do	/* swap start with end */
	t = start
	start = end
	end = t
end

'jump to line' start+1	/* goto start of block */

do line = start while line < end
	'text' COMMENT
	'beg of line'
	'down'
end

'jump to line' start+1	/* reset cursor */

exit
