Function: ede-proj-configure-test-required-file

ede-proj-configure-test-required-file is a byte-compiled function defined in pconf.el.gz.

Signature

(ede-proj-configure-test-required-file ARG &rest ARGS)

Implementations

(ede-proj-configure-test-required-file (THIS ede-proj-project) FILE) in `ede/pconf.el'.

For project THIS, test that the file FILE exists, or create it.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/pconf.el.gz
(cl-defmethod ede-proj-configure-test-required-file ((this ede-proj-project) file)
  "For project THIS, test that the file FILE exists, or create it."
  (let ((f (ede-expand-filename (ede-toplevel this) file t)))
    (when (not (file-exists-p f))
      (save-excursion
	(find-file f)
	(cond ((string= file "AUTHORS")
	       (insert (user-full-name) " <" (user-login-name) ">"))
	      ((string= file "NEWS")
	       (insert "NEWS file for " (ede-name this)))
	      (t (insert "\n")))
	(save-buffer)
	(when
	    (and (eq ede-pconf-create-file-query 'ask)
		 (not (eq ede-pconf-create-file-query 'never))
		 (not (y-or-n-p
		       (format "I had to create the %s file for you.  Ok? "
			       file))))
	  (error "Quit"))))))