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

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

[elpa] externals/phps-mode 5e30a65 076/405: Added TODO items


From: Stefan Monnier
Subject: [elpa] externals/phps-mode 5e30a65 076/405: Added TODO items
Date: Sat, 13 Jul 2019 09:59:46 -0400 (EDT)

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

    Added TODO items
---
 phps-functions.el      | 6 ++++++
 phps-test-functions.el | 9 +++++++++
 2 files changed, 15 insertions(+)

diff --git a/phps-functions.el b/phps-functions.el
index 03f2d8c..0e84dc5 100644
--- a/phps-functions.el
+++ b/phps-functions.el
@@ -121,12 +121,18 @@
               (when (not (equal indent-sum (current-indentation)))
                 ;; (message "Indenting to %s current column %s" indent-sum 
(current-indentation))
                 ;; (message "inside scripting, start: %s, end: %s, indenting 
to column %s " start end indent-level)
+
+                ;; TODO When indent is changed the trailing tokens just need 
to adjust their token positions, this will improve speed of indent-region a lot
                 (indent-line-to indent-sum)
+
                 (let ((line-start (line-beginning-position)))
+
+                  ;; Set point of change if it's not set or if it's larger 
than current point
                   (when (or (not phps-mode/buffer-changes--start)
                             (< line-start phps-mode/buffer-changes--start))
                     ;; (message "Setting changes start from %s to %s" 
phps-mode/buffer-changes--start start)
                     (setq phps-mode/buffer-changes--start line-start))
+                  
                   (phps-mode/run-incremental-lex))))))))))
 
 ;; TODO Implement this?
diff --git a/phps-test-functions.el b/phps-test-functions.el
index c24b35b..ff3f82d 100644
--- a/phps-test-functions.el
+++ b/phps-test-functions.el
@@ -137,6 +137,15 @@
    (let ((buffer-contents (buffer-substring-no-properties (point-min) 
(point-max))))
      (should (equal buffer-contents "<?php\nif (random_expression(\ntrue\n)) 
{\nsome_logic_here();\n}"))))
 
+  ;; TODO Test this
+        ;; if (empty(
+        ;;         $this->var
+        ;;         ) && !empty($this->var)
+        ;;     ) {
+        ;;     $this->var = 'abc123';
+        ;; }
+
+
   )
 
 (defun phps-mode/test-functions--get-point-data ()



reply via email to

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