From 31e4cc2a189ef7b0de5057a90580d80634bd3d06 Mon Sep 17 00:00:00 2001 From: David Engster Date: Sun, 7 Oct 2012 20:19:58 +0200 Subject: [PATCH] * semantic/ede-grammar.el (project-compile-target): Fix grammar compilation after introduction of %provide statement. --- lisp/cedet/ChangeLog | 5 +++++ lisp/cedet/semantic/ede-grammar.el | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 524eec4ad5f..453939e6ce1 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,8 @@ +2012-10-07 David Engster + + * semantic/ede-grammar.el (project-compile-target): Fix grammar + compilation after introduction of %provide statement. + 2012-10-07 David Engster * semantic.el (semantic-new-buffer-setup-functions): Remove setup diff --git a/lisp/cedet/semantic/ede-grammar.el b/lisp/cedet/semantic/ede-grammar.el index c92fcabecb1..16cf0ca96a2 100644 --- a/lisp/cedet/semantic/ede-grammar.el +++ b/lisp/cedet/semantic/ede-grammar.el @@ -143,12 +143,10 @@ Lays claim to all -by.el, and -wy.el files." (utd 0)) (mapc (lambda (src) (with-current-buffer (find-file-noselect src) - (save-excursion - (semantic-grammar-create-package)) - ;; After compile, the current buffer is the compiled grammar. - ;; Save and compile it. - (save-buffer) - (let* ((src (buffer-file-name)) + (let* ((package (semantic-grammar-create-package)) + (fname (progn (string-match ".*/\\(.+\\.el\\)" package) + (match-string 1 package))) + (src (with-current-buffer fname (buffer-file-name))) (csrc (concat (file-name-sans-extension src) ".elc"))) (if (< emacs-major-version 24) ;; Does not have `byte-recompile-file' -- 2.39.2