Function: srecode-table

srecode-table is a byte-compiled function defined in find.el.gz.

Signature

(srecode-table &optional MODE)

Documentation

Return the currently active Semantic Recoder table for this buffer.

Optional argument MODE specifies the mode table to use.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/srecode/find.el.gz
;;; Code:

(defun srecode-table (&optional mode)
  "Return the currently active Semantic Recoder table for this buffer.
Optional argument MODE specifies the mode table to use."
  (let* ((modeq (or mode major-mode))
	 (table (srecode-get-mode-table modeq)))

    ;; If there isn't one, keep searching backwards for a table.
    (while (and (not table) (setq modeq (get-mode-local-parent modeq)))
      (setq table (srecode-get-mode-table modeq)))

    ;; Last ditch effort.
    (when (not table)
      (setq table (srecode-get-mode-table 'default)))

    table))