Mercurial > emacs
changeset 105440:bec7f10791da
* 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.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 04 Oct 2009 19:00:54 +0000 |
parents | 9248683abf3b |
children | 457c7a0ec078 |
files | lisp/ChangeLog lisp/cedet/ede/pmake.el lisp/cedet/ede/proj-comp.el |
diffstat | 3 files changed, 19 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Oct 04 14:25:42 2009 +0000 +++ b/lisp/ChangeLog Sun Oct 04 19:00:54 2009 +0000 @@ -1,7 +1,11 @@ 2009-10-04 Chong Yidong <cyd@stupidchicken.com> - * 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 <michael.albinus@gmx.de>
--- a/lisp/cedet/ede/pmake.el Sun Oct 04 14:25:42 2009 +0000 +++ b/lisp/cedet/ede/pmake.el Sun Oct 04 19:00:54 2009 +0000 @@ -255,18 +255,6 @@ (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)
--- a/lisp/cedet/ede/proj-comp.el Sun Oct 04 14:25:42 2009 +0000 +++ b/lisp/cedet/ede/proj-comp.el Sun Oct 04 19:00:54 2009 +0000 @@ -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 @@ "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)