(with-temp-buffer
(insert-file-contents src-file)
(if mode
(let ((func (intern (format "%s-mode" mode))))
(if (functionp func)
(funcall func)
(warn (concat "Mode %s not found for %s. "
"Consider installing it. "
"No syntax highlight would be bone this time.")
mode src-file)))
(set-auto-mode))
This can not auto detect the major of src-file, may be you can add this:
file: o-blog-source.el fun: o-blog-publish-source
This can not auto detect the major of src-file, may be you can add this: