Update copyright notices for 2013.
[bpt/emacs.git] / lisp / cedet / srecode / compile.el
index 8a1291f..170b99c 100644 (file)
@@ -1,6 +1,6 @@
 ;;; srecode/compile --- Compilation of srecode template files.
 
-;; Copyright (C) 2005, 2007-201 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007-2013 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Keywords: codegeneration
@@ -199,6 +199,8 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use."
 (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)))