branch: externals/phpinspect commit b82c78634605d7dd7095af665e7d6d94a4bb4e35 Author: Hugo Thunnissen <de...@hugot.nl> Commit: Hugo Thunnissen <de...@hugot.nl>
Fix native compilation warnings --- compile.bash | 2 ++ native-compile.bash | 11 +++++++++++ phpinspect-autoload.el | 1 + phpinspect-index.el | 1 + phpinspect-parser.el | 2 +- 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/compile.bash b/compile.bash index 5353dbabc7..81f4d27f0f 100644 --- a/compile.bash +++ b/compile.bash @@ -4,10 +4,12 @@ rm ./**/*.elc rm *.elc for file in ./*.el; do + echo 'Compiling '"$file"' ...' cask emacs -batch -L . --eval '(setq byte-compile-error-on-warn t)' -f batch-byte-compile "$file" || break done for file in ./**/*.el; do + echo 'Compiling '"$file"' ...' cask emacs -batch -L . --eval '(setq byte-compile-error-on-warn t)' -f batch-byte-compile "$file" || break done diff --git a/native-compile.bash b/native-compile.bash new file mode 100644 index 0000000000..3e88f3d35e --- /dev/null +++ b/native-compile.bash @@ -0,0 +1,11 @@ +#!/bin/bash + +for file in ./*.el; do + echo 'Compiling '"$file"' ...' + cask emacs -batch -L . --eval '(setq native-compile-error-on-warn t)' -f batch-native-compile "$file" || break +done + +for file in ./**/*.el; do + echo 'Compiling '"$file"' ...' + cask emacs -batch -L . --eval '(setq byte-compile-error-on-warn t)' -f batch-native-compile "$file" || break +done diff --git a/phpinspect-autoload.el b/phpinspect-autoload.el index f3e78eca3f..db57e9aedf 100644 --- a/phpinspect-autoload.el +++ b/phpinspect-autoload.el @@ -27,6 +27,7 @@ (require 'phpinspect-fs) (require 'phpinspect-util) (require 'phpinspect-pipeline) +(require 'json) (cl-defstruct (phpinspect-psr0 (:constructor phpinspect-make-psr0-generated)) diff --git a/phpinspect-index.el b/phpinspect-index.el index b3dc9d1bcf..b89c7e4883 100644 --- a/phpinspect-index.el +++ b/phpinspect-index.el @@ -27,6 +27,7 @@ (require 'phpinspect-util) (require 'phpinspect-type) (require 'phpinspect-token-predicates) +(require 'phpinspect-parser) (defun phpinspect--function-from-scope (scope) (cond ((and (phpinspect-static-p (cadr scope)) diff --git a/phpinspect-parser.el b/phpinspect-parser.el index 67bd327053..beb32f721f 100644 --- a/phpinspect-parser.el +++ b/phpinspect-parser.el @@ -53,7 +53,7 @@ If STRING has text properties, they are stripped." (set-text-properties 0 length nil value) (list token-keyword value))) -(eval-when-compile +(eval-and-compile (defun phpinspect-handler-func-name (handler-name) (intern (concat "phpinspect--" (symbol-name handler-name) "-handler")))