;;; srecode/compile --- Compilation of srecode template files.
-;; Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007-2013 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: codegeneration
(defun srecode-compile-templates ()
"Compile a semantic recode template file into a mode-local variable."
(interactive)
+ (unless (semantic-active-p)
+ (error "You have to activate semantic-mode to compile SRecode templates."))
(require 'srecode/insert)
(message "Compiling template %s..."
(file-name-nondirectory (buffer-file-name)))