diff options
Diffstat (limited to 'lisp/cedet/ede/pmake.el')
-rw-r--r-- | lisp/cedet/ede/pmake.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index bd5400bb615..c638a5f0307 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el @@ -265,12 +265,13 @@ Execute BODY in a location where a value can be placed." "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))) - )) + (unless + (save-excursion + (re-search-backward (concat "^" v "\\s-*=") nil t)) + (insert v "=") + ,@body + (when addcr (insert "\n")) + (goto-char (point-max))))) (put 'ede-pmake-insert-variable-once 'lisp-indent-function 1) ;;; SOURCE VARIABLE NAME CONSTRUCTION |