branch: externals/phps-mode
commit 95e749e69fbc68b705ade0a453846af47e7fb9ac
Author: Christian Johansson <[email protected]>
Commit: Christian Johansson <[email protected]>
Started with indentation function
---
phps-functions.el | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/phps-functions.el b/phps-functions.el
index 48aac15..9b8382a 100644
--- a/phps-functions.el
+++ b/phps-functions.el
@@ -38,7 +38,14 @@
(defun phps-mode/indent-line ()
"Indent line."
- )
+ (let ((data (phps-mode/lexer-get-point-data)))
+ (if (nth 0 data)
+ (progn
+ (message "inside scripting %s" data)
+ (indent-line-to (nth 1 data)))
+ (progn
+ (message "Outside scripting %s" data)
+ (indent-relative)))))
(defun phps-mode/indent-region ()
"Indent region."
@@ -47,7 +54,7 @@
(defun phps-mode/functions-init ()
"PHP specific init-cleanup routines."
- ;; (set (make-local-variable 'indent-line-function) #'phps-mode/indent-line)
+ (set (make-local-variable 'indent-line-function) #'phps-mode/indent-line)
;; (set (make-local-variable 'indent-line-function)
#'phps-mode/indent-region)
)