Function: srecode-load-tables-for-mode
srecode-load-tables-for-mode is a byte-compiled function defined in
find.el.gz.
Signature
(srecode-load-tables-for-mode MMODE &optional APPNAME)
Documentation
Load all the template files for MMODE.
Templates are found in the SRecode Template Map.
See srecode-get-maps for more.
APPNAME is the name of an application. In this case,
all template files for that application will be loaded.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/srecode/find.el.gz
;;; TRACKER
;;
;; Template file tracker for between sessions.
;;
(defun srecode-load-tables-for-mode (mmode &optional appname)
"Load all the template files for MMODE.
Templates are found in the SRecode Template Map.
See `srecode-get-maps' for more.
APPNAME is the name of an application. In this case,
all template files for that application will be loaded."
(let ((files
(apply #'append
(mapcar
(if appname
(lambda (map)
(srecode-map-entries-for-app-and-mode map appname mmode))
(lambda (map)
(srecode-map-entries-for-mode map mmode)))
(srecode-get-maps))))
)
;; Don't recurse if we are already the 'default state.
(when (not (eq mmode 'default))
;; Are we a derived mode? If so, get the parent mode's
;; templates loaded too.
(if (get-mode-local-parent mmode)
(srecode-load-tables-for-mode (get-mode-local-parent mmode)
appname)
;; No parent mode, all templates depend on the defaults being
;; loaded in, so get that in instead.
(srecode-load-tables-for-mode 'default appname)))
;; Load in templates for our major mode.
(dolist (f files)
(let ((mt (srecode-get-mode-table mmode))
)
(when (or (not mt) (not (srecode-mode-table-find mt (car f))))
(srecode-compile-file (car f)))
))
))