Function: mode-local-symbol
mode-local-symbol is a byte-compiled function defined in
mode-local.el.gz.
Signature
(mode-local-symbol SYMBOL &optional MODE)
Documentation
Return the mode local symbol bound with SYMBOL's name.
Return nil if the mode local symbol doesn't exist.
If optional argument MODE is nil, lookup first into locally bound
symbols, then in those bound in current major-mode and its parents.
If MODE is non-nil, lookup into symbols bound in that major mode and
its parents.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/mode-local.el.gz
(defsubst mode-local-symbol (symbol &optional mode)
"Return the mode local symbol bound with SYMBOL's name.
Return nil if the mode local symbol doesn't exist.
If optional argument MODE is nil, lookup first into locally bound
symbols, then in those bound in current `major-mode' and its parents.
If MODE is non-nil, lookup into symbols bound in that major mode and
its parents."
(let ((name (symbol-name symbol)) bind)
(or mode
(setq mode mode-local-active-mode)
(setq mode major-mode
bind (and mode-local-symbol-table
(intern-soft name mode-local-symbol-table))))
(while (and mode (not bind))
(or (and (get mode 'mode-local-symbol-table)
(setq bind (intern-soft
name (get mode 'mode-local-symbol-table))))
(setq mode (get-mode-local-parent mode))))
bind))