From: Eric M. Ludlam <eric@si...> - 2009-01-21 12:55:58
>>> Alex Ott <alexott@...> seems to think that:
>I try to use SRecode templates for C++ code, and found annoying, that it
>tries to recompile templates every time as i run C-c / /
>Is it possible to cache results of the templates compilation? cedet is
>compiled without any problems
Hmmm. It is supposed to cache everything from a set of compiled
templates into a template map, then reference the template map.
Before each use it will see if the maps need updating. I took a look
to see under what conditions it would recompile stuff. They are:
;; 1) Do we even have a MAP or save file?
(when (and (not srecode-current-map)
(not (file-exists-p srecode-map-save-file)))
(when (not (file-exists-p (file-name-directory srecode-map-save-file)))
So if some condition prevents it from building a map file, then it
will recompile each time.
Next up, it will scan for changes on disk. Things like deleted files,
or new files it hasn't seen before. It won't compile them though,
just scans them for which major-mode they belong to.
So I would guess the save file is invalid. It should have asked to
create a save-dir for you though.
Since this doesn't repro for me, your best bet is to edebug-defun
srecode-map-update-map and see what it does.
Eric Ludlam: eric@...
Siege: http://www.siege-engine.com Emacs: http://cedet.sourceforge.net