Function: abbrev--active-tables

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

Signature

(abbrev--active-tables &optional TABLES)

Documentation

Return the list of abbrev tables that are currently active.

TABLES, if non-nil, overrides the usual rules. It can hold either a single abbrev table or a list of abbrev tables.

Source Code

;; Defined in /usr/src/emacs/lisp/abbrev.el.gz
(defun abbrev--active-tables (&optional tables)
  "Return the list of abbrev tables that are currently active.
TABLES, if non-nil, overrides the usual rules.  It can hold
either a single abbrev table or a list of abbrev tables."
  ;; We could just remove the `tables' arg and let callers use
  ;; (or table (abbrev--active-tables)) but then they'd have to be careful
  ;; to treat the distinction between a single table and a list of tables.
  (cond
   ((consp tables) tables)
   ((obarrayp tables) (list tables))
   (t
    (let ((tables (if (listp local-abbrev-table)
                      (append local-abbrev-table
                              (list global-abbrev-table))
                    (list local-abbrev-table global-abbrev-table))))
      ;; Add the minor-mode abbrev tables.
      (dolist (x abbrev-minor-mode-table-alist)
        (when (and (symbolp (car x)) (boundp (car x)) (symbol-value (car x)))
          (setq tables
                (if (listp (cdr x))
                    (append (cdr x) tables) (cons (cdr x) tables)))))
      tables))))