emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/phps-mode 184dfa5 034/405: Indentation outside PHP now


From: Stefan Monnier
Subject: [elpa] externals/phps-mode 184dfa5 034/405: Indentation outside PHP now does nothing
Date: Sat, 13 Jul 2019 09:59:34 -0400 (EDT)

branch: externals/phps-mode
commit 184dfa5494652263df2f2d244edebaf4eda26530
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>

    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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]