Function: indirect-variable

indirect-variable is a function defined in data.c.

Signature

(indirect-variable OBJECT)

Documentation

Return the variable at the end of OBJECT's variable chain.

If OBJECT is a symbol, follow its variable indirections (if any), and return the variable at the end of the chain of aliases. See Info node
(elisp)Variable Aliases.

If OBJECT is not a symbol, just return it.

View in manual

Probably introduced at or before Emacs version 22.1.

Source Code

// Defined in /usr/src/emacs/src/data.c
{
  if (SYMBOLP (object))
    {
      struct Lisp_Symbol *sym = XSYMBOL (object);
      while (sym->u.s.redirect == SYMBOL_VARALIAS)
	sym = SYMBOL_ALIAS (sym);
      XSETSYMBOL (object, sym);
    }
  return object;
}