Function: proj-comp-insert-variable-once

proj-comp-insert-variable-once is a macro defined in proj-comp.el.gz.

Signature

(proj-comp-insert-variable-once VARNAME &rest BODY)

Documentation

Add VARNAME into the current Makefile if it doesn't exist.

Execute BODY in a location where a value can be placed.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/proj-comp.el.gz
(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."
  (declare (indent 1) (debug (sexp body)))
  `(let ((v ,varname))
     (unless (re-search-backward (concat "^" v "\\s-*=") nil t)
       (insert v "=")
       ,@body
       (insert "\n")
       (goto-char (point-max)))))