Lines Matching defs:file
3 ;; found in the LICENSE file.
9 ;; the build.ninja file(s). See defcustoms below for settable knobs.
14 (defcustom cr-flymake-ninja-build-file "out/Debug/build.ninja"
16 build.ninja file to use.")
24 (when buffer-file-truename
25 (expand-file-name buffer-file-truename)))
29 (let ((srcdir (locate-dominating-file
30 (cr-flymake-absbufferpath) cr-flymake-ninja-build-file)))
31 (when srcdir (expand-file-name srcdir))))
38 (defun cr-flymake-current-file-name ()
40 file backing the current buffer or nil if it doesn't look like
48 "Return a path fragment for getting from the build.ninja file to src/."
52 (file-name-directory
53 (file-truename (or (and (cr-flymake-string-prefix-p
54 "/" cr-flymake-ninja-build-file)
55 cr-flymake-ninja-build-file)
57 cr-flymake-ninja-build-file))))
60 (defun cr-flymake-getfname (file-name-from-error-message)
61 "Strip cruft from the passed-in filename to help flymake find the real file."
62 (file-name-nondirectory file-name-from-error-message))
71 (file-name-directory cr-flymake-ninja-build-file))
73 (cr-flymake-current-file-name) "^")))))
76 "Kick off a syntax check after file save, if flymake-mode is on."
96 (defun cr-flymake-find-file ()
101 (cr-flymake-current-file-name))
102 ;; Since flymake-allowed-file-name-masks requires static regexps to match
105 (set (make-local-variable 'flymake-allowed-file-name-masks)
110 (flymake-find-file-hook)
113 (kill-local-variable 'flymake-allowed-file-name-masks))))
115 (add-hook 'find-file-hook 'cr-flymake-find-file 'append)