I open file ~/.srecode/html.srt, same if you open file like
/usr/share/emacs/24.2/etc/srecode/java.srt but you been clean up
(setq srecode-current-map (srecode-map "SRecode Map"))
and then open file with js-mode and execute M-x srecode-minor-mode.
I got error:
There should be a mode declaration in ...
Debugging shown that:
(defun srecode-map-validate-file-for-mode (file fast)
(set-buffer (get-buffer-create " *srecode-map-tmp*"))
(insert-file-contents file nil nil nil t)
;; Force it to be ready to parse.
(let ((semantic-init-hook nil))
(semantic-find-first-tag-by-name "mode" (current-buffer)))
(semantic-fetch-tags) is nil for already opened .srt files because in that
case (semantic-new-buffer-fcn) wasn't called...
So semantic-find-first-tag-by-name fine nothing and this if evaluated to nil:
(setq val (car (semantic-tag-variable-default mode-tag)))
(error "There should be a mode declaration in %s" file))
(semantic-new-buffer-fcn) need somehow call in case if user open .srt file and
doesn't enable semantic in this buffer...
Oleksandr Gavenko ( gavenkoa ) - 2013-01-13 09:18:11 PST