branch: externals/phps-mode
commit be46d9ca6ad12013b53164969f17c7ecd056d209
Author: Christian Johansson <christ...@cvj.se>
Commit: Christian Johansson <christ...@cvj.se>

    Added lexer autoload to functions
---
 phps-functions.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/phps-functions.el b/phps-functions.el
index 052405e..7bdfe26 100644
--- a/phps-functions.el
+++ b/phps-functions.el
@@ -36,6 +36,8 @@
 ;;; Code:
 
 
+(autoload 'phps-mode/lexer-get-point-data "phps-lexer")
+
 (defun phps-mode/indent-line ()
   "Indent line."
   (let ((data (phps-mode/lexer-get-point-data)))
@@ -66,7 +68,8 @@
 
   (set (make-local-variable 'indent-line-function) #'phps-mode/indent-line)
 
-  (when phps-mode/use-psr-2
+  (when (and (boundp 'phps-mode/use-psr-2)
+             phps-mode/use-psr-2)
 
     ;; PSR-2 : Code MUST use an indent of 4 spaces
     (set (make-local-variable 'tab-width) 4)

Reply via email to