Function: abbrev--symbol
abbrev--symbol is a byte-compiled function defined in abbrev.el.gz.
Signature
(abbrev--symbol ABBREV TABLE)
Documentation
Return the symbol representing 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 the abbrev-table TABLE rather than the normal obarray. The value is nil if such an abbrev is not defined.
Source Code
;; Defined in /usr/src/emacs/lisp/abbrev.el.gz
(defun abbrev--symbol (abbrev table)
"Return the symbol representing 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 the abbrev-table TABLE rather than the normal obarray.
The value is nil if such an abbrev is not defined."
(let* ((case-fold (not (abbrev-table-get table :case-fixed)))
;; In case the table doesn't set :case-fixed but some of the
;; abbrevs do, we have to be careful.
(sym
;; First try without case-folding.
(or (obarray-get table abbrev)
(when case-fold
;; We didn't find any abbrev, try case-folding.
(let ((sym (obarray-get table (downcase abbrev))))
;; Only use it if it doesn't require :case-fixed.
(and sym (not (abbrev-get sym :case-fixed))
sym))))))
(if (symbol-value sym)
sym)))