branch: externals/phps-mode
commit 184dfa5494652263df2f2d244edebaf4eda26530
Author: Christian Johansson <[email protected]>
Commit: Christian Johansson <[email protected]>
Indentation outside PHP now does nothing
---
phps-functions.el | 3 ++-
phps-test-functions.el | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/phps-functions.el b/phps-functions.el
index 57f59c6..677d19a 100644
--- a/phps-functions.el
+++ b/phps-functions.el
@@ -51,7 +51,8 @@
(indent-line-to indent-level))
(progn
(message "Outside scripting %s" start)
- (indent-relative)))))))
+ ;; (indent-relative)
+ ))))))
(defun phps-mode/indent-region ()
"Indent region."
diff --git a/phps-test-functions.el b/phps-test-functions.el
index 891c541..350c0cd 100644
--- a/phps-test-functions.el
+++ b/phps-test-functions.el
@@ -66,6 +66,14 @@
(let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
(should (equal buffer-contents "<html><head><title><?php if
($myCondition) {\nif ($mySeconCondition) {\necho $title;\n\n }
?></title><body>Bla bla</body></html>"))))
+ (phps-mode/with-test-buffer
+ "<html><head><title><?php if ($myCondition) {\nif ($mySeconCondition)
{\necho $title;\n\n}\n?>\n</title><body>Bla bla</body></html>"
+
+ (goto-char 110)
+ (phps-mode/indent-line)
+ (let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
+ (should (equal buffer-contents "<html><head><title><?php if
($myCondition) {\nif ($mySeconCondition) {\necho
$title;\n\n}\n?>\n</title><body>Bla bla</body></html>"))))
+
)
(defun phps-mod/test-functions ()