Browse files

Create temp files in system temp dir

  • Loading branch information...
1 parent 555e176 commit 7ffdc98ff908763fe30a2864c087d28e37900be0 @purcell committed Nov 7, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 flymake-php.el
10 flymake-php.el
@@ -17,12 +17,20 @@
(defvar flymake-php-executable "php"
"The php executable to use for syntax checking.")
+(defun flymake-php--create-temp-in-system-tempdir (file-name prefix)
+ "Return a temporary file name into which flymake can save buffer contents.
+This is tidier than `flymake-create-temp-inplace', and therefore
+preferable when the checking doesn't depend on the file's exact
+ (make-temp-file (or prefix "flymake-php") nil ".php"))
;; Invoke php with '-f' to get syntax checking
(defun flymake-php-init ()
"Construct a command that flymake can use to check php source."
(list flymake-php-executable
(list "-f" (flymake-init-create-temp-buffer-copy
- 'flymake-create-temp-inplace) "-l")))
+ 'flymake-php--create-temp-in-system-tempdir) "-l")))
(defun flymake-php-load ()

0 comments on commit 7ffdc98

Please sign in to comment.