* src/syntax.c (back_comment): Detect the case where a 1-char comment
[bpt/emacs.git] / lisp / cedet / srecode / compile.el
index 5b3d8fb..3caab23 100644 (file)
@@ -1,6 +1,6 @@
 ;;; srecode/compile --- Compilation of srecode template files.
 
-;;; Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Keywords: codegeneration
 ;; Compile a Semantic Recoder template file.
 ;;
 ;; Template files are parsed using a Semantic/Wisent parser into
-;; a tag table.  The code therin is then further parsed down using
+;; a tag table.  The code therein is then further parsed down using
 ;; a regular expression parser.
 ;;
 ;; The output are a series of EIEIO objects which represent the
 ;; templates in a way that could be inserted later.
 
+(eval-when-compile (require 'cl))
 (require 'semantic)
 (require 'eieio)
 (require 'eieio-base)
 (require 'srecode)
 (require 'srecode/table)
 
-(declare-function srecode-template-inserter-newline-child-p "srecode/insert")
+(declare-function srecode-template-inserter-newline-child-p "srecode/insert"
+                 t t)
 (declare-function srecode-create-section-dictionary "srecode/dictionary")
 (declare-function srecode-dictionary-compound-variable "srecode/dictionary")
 
@@ -84,7 +86,7 @@ for push, pop, and peek for the active template.")
 
 (defun srecode-flush-active-templates ()
   "Flush the active template storage.
-Useful if something goes wrong in SRecode, and the active tempalte
+Useful if something goes wrong in SRecode, and the active template
 stack is broken."
   (interactive)
   (if (oref srecode-template active)
@@ -187,6 +189,8 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use."
          (set-buffer (semantic-find-file-noselect fname))
        (set-buffer peb))
       ;; Do the compile.
+      (unless (semantic-active-p)
+       (semantic-new-buffer-fcn))
       (srecode-compile-templates)
       ;; Trash the buffer if we had to read it in.
       (if (not peb)
@@ -634,8 +638,8 @@ Argument INDENT specifies the indentation level for the list."
 
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
-;; generated-autoload-feature: srecode/loaddefs
 ;; generated-autoload-load-name: "srecode/compile"
 ;; End:
 
+;; arch-tag: d993ffab-2704-4bb2-bd92-eafe803af3be
 ;;; srecode/compile.el ends here