X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/b82525f29a46897b1583919818d174d6f778e2bd..fbb3da770f233a8e0cf99d5f053b0c31cbbc8db4:/lisp/cedet/srecode/compile.el diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el index 5b3d8fb50f..3caab23e31 100644 --- a/lisp/cedet/srecode/compile.el +++ b/lisp/cedet/srecode/compile.el @@ -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 ;; Keywords: codegeneration @@ -25,19 +25,21 @@ ;; 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