'Return a role adapter function that always gives the registered
role its full name (\'domain:name\') as the first argument.'

def role(self, name):

    if (name in self._role_cache):
        return self._role_cache[name]
    if (name not in self.roles):
        return None
    fullname = ('%s:%s' % (self.name, name))
    def role_adapter(typ, rawtext, text, lineno, inliner, options={}, content=[]):
        return self.roles[name](fullname, rawtext, text, lineno, inliner, options, content)
    self._role_cache[name] = role_adapter
    return role_adapter
