diff --git a/lisp/php-flymake.el b/lisp/php-flymake.el index 25ae9083..00bafba8 100644 --- a/lisp/php-flymake.el +++ b/lisp/php-flymake.el @@ -27,6 +27,7 @@ ;;; Code: (require 'flymake) (require 'cl-lib) +(require 'php-core) (eval-and-compile (require 'flymake-proc)) (eval-when-compile @@ -101,7 +102,7 @@ See `flymake-diagnostic-functions' about REPORT-FN and ARGS parameters." (defun php-flymake--build-command-line (file) "Return the command line for `php -l' FILE." (let* ((command-args (or php-flymake-executable-command-args - (list (or (bound-and-true-p php-executable) "php")))) + (list php-executable))) (cmd (car-safe command-args)) (default-directory (expand-file-name "~"))) (unless (or (file-executable-p cmd) diff --git a/lisp/php-project.el b/lisp/php-project.el index 570c162d..e057b5fe 100644 --- a/lisp/php-project.el +++ b/lisp/php-project.el @@ -58,6 +58,7 @@ ;;; Code: (eval-when-compile (require 'cl-lib)) +(require 'php-core) (require 'projectile nil t) ;; Constants @@ -217,12 +218,10 @@ Typically it is `pear', `drupal', `wordpress', `symfony2' and `psr2'.") (defun php-project-get-php-executable () "Return path to PHP executable file." - (cond - ((and (stringp php-project-php-executable) - (file-executable-p php-project-php-executable)) - php-project-php-executable) - ((boundp 'php-executable) php-executable) - (t (executable-find "php")))) + (if (and (stringp php-project-php-executable) + (file-executable-p php-project-php-executable)) + php-project-php-executable + php-executable)) (defun php-project-get-file-html-template-type (filename) "Return symbol T, NIL or `auto' by `FILENAME'."