Function: flymake-proc--init-create-temp-source-and-master-buffer-copy

flymake-proc--init-create-temp-source-and-master-buffer-copy is a byte-compiled function defined in flymake-proc.el.gz.

Signature

(flymake-proc--init-create-temp-source-and-master-buffer-copy GET-INCL-DIRS-F CREATE-TEMP-F MASTER-FILE-MASKS INCLUDE-REGEXP)

Documentation

Find master file (or buffer), create its copy and a copy of the source file.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/flymake-proc.el.gz
(defun flymake-proc--init-create-temp-source-and-master-buffer-copy (get-incl-dirs-f create-temp-f master-file-masks include-regexp)
  "Find master file (or buffer), create its copy and a copy of the source file."
  (let* ((source-file-name       buffer-file-name)
	 (temp-source-file-name  (flymake-proc-init-create-temp-buffer-copy create-temp-f))
	 (master-and-temp-master (flymake-proc--create-master-file
				  source-file-name temp-source-file-name
				  get-incl-dirs-f create-temp-f
				  master-file-masks include-regexp)))

    (if (not master-and-temp-master)
	(progn
          (flymake-proc--panic
           "NOMASTER"
           (format-message "cannot find master file for %s"
                           source-file-name))
          nil)
      (setq flymake-proc--master-file-name (nth 0 master-and-temp-master))
      (setq flymake-proc--temp-master-file-name (nth 1 master-and-temp-master)))))