Function: abbrev-symbol

abbrev-symbol is a byte-compiled function defined in abbrev.el.gz.

Signature

(abbrev-symbol ABBREV &optional TABLE)

Documentation

Return the symbol representing the abbrev named ABBREV in TABLE.

This symbol's name is ABBREV, but it is not the canonical symbol of that name; it is interned in an abbrev-table rather than the normal obarray. The value is nil if such an abbrev is not defined. Optional second arg TABLE is the abbrev table to look it up in. The default is to try buffer's mode-specific abbrev table, then global table.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/abbrev.el.gz
(defun abbrev-symbol (abbrev &optional table)
  "Return the symbol representing the abbrev named ABBREV in TABLE.
This symbol's name is ABBREV, but it is not the canonical symbol of that name;
it is interned in an abbrev-table rather than the normal obarray.
The value is nil if such an abbrev is not defined.
Optional second arg TABLE is the abbrev table to look it up in.
The default is to try buffer's mode-specific abbrev table, then global table."
  (let ((tables (abbrev--active-tables table))
        sym)
    (while (and tables (not sym))
      (let* ((table (pop tables)))
        (setq tables (append (abbrev-table-get table :parents) tables))
        (setq sym (abbrev--symbol abbrev table))))
    sym))