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

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

[elpa] externals/phps-mode b2ff76e 283/405: Started on debugging switch


From: Stefan Monnier
Subject: [elpa] externals/phps-mode b2ff76e 283/405: Started on debugging switch indentation bug
Date: Sat, 13 Jul 2019 10:00:32 -0400 (EDT)

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

    Started on debugging switch indentation bug
---
 phps-mode-functions.el      | 4 ++--
 phps-mode-test-functions.el | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/phps-mode-functions.el b/phps-mode-functions.el
index 69d302e..72be62d 100644
--- a/phps-mode-functions.el
+++ b/phps-mode-functions.el
@@ -501,7 +501,7 @@
                         (if allow-custom-column-decrement
                             (progn
                               (setq column-level (- column-level (- 
nesting-start nesting-end)))
-                              (setq allow-custom-column-increment nil))
+                              (setq allow-custom-column-decrement nil))
                           (setq column-level (1- column-level)))
 
                         ;; Prevent negative column-values
@@ -515,7 +515,7 @@
                     (if allow-custom-column-decrement
                         (progn
                           (setq temp-post-indent (- temp-post-indent (- 
nesting-start nesting-end)))
-                          (setq allow-custom-column-increment nil))
+                          (setq allow-custom-column-decrement nil))
                       (setq temp-post-indent (1- temp-post-indent)))
 
                     ;; Prevent negative column-values
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index 2394a13..815ff60 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -343,7 +343,6 @@
    (message "Indent: %s" (phps-mode-test-hash-to-list 
(phps-mode-functions-get-lines-indent)))
    (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (3 0)) (6 (3 
0)) (7 (2 0)) (8 (3 0)) (9 (2 0)) (10 (3 0)) (11 (1 0)) (12 (1 0)) (13 (2 0)) 
(14 (2 0)) (15 (1 0)) (16 (0 0))) (phps-mode-test-hash-to-list 
(phps-mode-functions-get-lines-indent)))))
 
-
   (phps-mode-test-with-buffer
    "<?php\nif (true) {\n    switch ($condition) {\n        case true:\n        
    echo 'here';\n            echo 'here 2';\n        case false:\n            
echo 'here 4';\n        default:\n            echo 'here 3';\n    }\n    
sprintf(__(\n        'Error: %s',\n        $error\n    ));\n}\n"
    "Curly switch, case, default with exception after it"
@@ -633,7 +632,7 @@
 (defun phps-mode-test-functions ()
   "Run test for functions."
   ;; (setq debug-on-error t)
-  ;; (setq phps-mode-functions-verbose t)
+  (setq phps-mode-functions-verbose t)
   (phps-mode-test-functions-get-lines-lindent-if)
   (phps-mode-test-functions-get-lines-indent-classes)
   (phps-mode-test-functions-get-lines-indent-inline-if)



reply via email to

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