From: Chong Yidong Date: Sun, 4 Oct 2009 19:00:54 +0000 (+0000) Subject: * cedet/ede/pmake.el (ede-pmake-insert-variable-once): Delete. X-Git-Tag: emacs-pretest-23.1.90~941 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d91485a9a2f60fdb1a24a104d6eb42d4ef83a3ed;p=emacs.git * cedet/ede/pmake.el (ede-pmake-insert-variable-once): Delete. * cedet/ede/proj-comp.el: Don't require ede/pmake at toplevel. (proj-comp-insert-variable-once): New macro, renamed from ede-pmake-insert-variable-once in ede/pmake.edl. (ede-proj-makefile-insert-variables): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95a8cd0f926..61bdbf43c2d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,11 @@ 2009-10-04 Chong Yidong - * cedet/ede/proj-comp.el: Don't require ede/pmake at toplevel. - (ede-proj-makefile-insert-variables): Require ede/pmake. + * cedet/ede/pmake.el (ede-pmake-insert-variable-once): Delete. + + * cedet/ede/proj-comp.el: Don't require ede/pmake at toplevel. + (proj-comp-insert-variable-once): New macro, renamed from + ede-pmake-insert-variable-once in ede/pmake.edl. + (ede-proj-makefile-insert-variables): Use it. 2009-10-04 Michael Albinus diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index 79775429130..a8b16dce139 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el @@ -255,18 +255,6 @@ Execute BODY in a location where a value can be placed." (goto-char (point-max)))) (put 'ede-pmake-insert-variable-shared 'lisp-indent-function 1) -(defmacro ede-pmake-insert-variable-once (varname &rest body) - "Add VARNAME into the current Makefile if it doesn't exist. -Execute BODY in a location where a value can be placed." - `(let ((addcr t) (v ,varname)) - (unless (re-search-backward (concat "^" v "\\s-*=") nil t) - (insert v "=") - ,@body - (if addcr (insert "\n")) - (goto-char (point-max))) - )) -(put 'ede-pmake-insert-variable-once 'lisp-indent-function 1) - ;;; SOURCE VARIABLE NAME CONSTRUCTION (defsubst ede-pmake-varname (obj) diff --git a/lisp/cedet/ede/proj-comp.el b/lisp/cedet/ede/proj-comp.el index 378d299cc9e..376c48f9c10 100644 --- a/lisp/cedet/ede/proj-comp.el +++ b/lisp/cedet/ede/proj-comp.el @@ -46,7 +46,6 @@ (require 'ede) ;source object (require 'ede/autoconf-edit) -(declare-function ede-pmake-insert-variable-once "ede/pmake") ;;; Types: (defclass ede-compilation-program (eieio-instance-inheritor) @@ -251,14 +250,25 @@ This will prevent rules from creating duplicate variables or rules." "Flush the configure file (current buffer) to accomodate THIS." nil) +(defmacro proj-comp-insert-variable-once (varname &rest body) + "Add VARNAME into the current Makefile if it doesn't exist. +Execute BODY in a location where a value can be placed." + `(let ((addcr t) (v ,varname)) + (unless (re-search-backward (concat "^" v "\\s-*=") nil t) + (insert v "=") + ,@body + (if addcr (insert "\n")) + (goto-char (point-max))) + )) +(put 'proj-comp-insert-variable-once 'lisp-indent-function 1) + (defmethod ede-proj-makefile-insert-variables ((this ede-compilation-program)) "Insert variables needed by the compiler THIS." - (require 'ede/pmake) (if (eieio-instance-inheritor-slot-boundp this 'variables) (with-slots (variables) this (mapcar (lambda (var) - (ede-pmake-insert-variable-once (car var) + (proj-comp-insert-variable-once (car var) (let ((cd (cdr var))) (if (listp cd) (mapc (lambda (c) (insert " " c)) cd)