def METHOD_NAME(self, anchor):
    """Add anchor to the in-memory registry and to the
    current anchor buffer."""
    if anchor not in self._anchor_buffer:
        self._anchor_buffer.append(anchor)
    key = self._key_from_anchor(anchor)
    if key not in self._registry:
        self._registry[key] = {}
    reg = self._registry[key]
    if anchor not in reg:
        hanchor = self._html_anchor(anchor)
        url = f"{self.html_url}{hanchor}"
        reg[anchor] = dict(
            term=anchor,
            html=hanchor,
            url=url,
        )