function CopyAsLink()
	local old, new, var, url, title
	title, url = km.GetDocInfo()
	old = km.getclipboard()
	km.id("ID_EDIT_COPY")
	new = km.getclipboard()
	if old == new then
		km.setclipboard(title .. "\r\n" .. url .. "\r\n")
	else
		km.setclipboard(title .. "\r\n" .. url .. "\r\n> " .. new .. "\r\n")
	end
end
