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

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

[elpa] externals/phps-mode da1d1de 051/405: Temporary lexer after change


From: Stefan Monnier
Subject: [elpa] externals/phps-mode da1d1de 051/405: Temporary lexer after change until other work is ready
Date: Sat, 13 Jul 2019 09:59:41 -0400 (EDT)

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

    Temporary lexer after change until other work is ready
---
 phps-functions.el          | 3 ++-
 phps-lexer.el              | 7 +++++--
 sample-php-files/class.php | 3 ---
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/phps-functions.el b/phps-functions.el
index 2ca33aa..a7b795b 100644
--- a/phps-functions.el
+++ b/phps-functions.el
@@ -91,7 +91,8 @@
                     ;; (message "Tokens was valid, decreasing indent %s - %s" 
(line-beginning-position) (line-end-position))
                     (setq indent-level (- indent-level (- indent-start 
indent-end))))))
               ;; (message "inside scripting, start: %s, end: %s, indenting to 
column %s " start end indent-level)
-              (indent-line-to (* indent-level tab-width)))))))))
+              (indent-line-to (* indent-level tab-width))
+              (phps-mode/run-incremental-lex))))))))
 
 ;; TODO Implement this
 (defun phps-mode/indent-region ()
diff --git a/phps-lexer.el b/phps-lexer.el
index 78919e3..123a3cb 100644
--- a/phps-lexer.el
+++ b/phps-lexer.el
@@ -1331,8 +1331,10 @@ ANY_CHAR'
   (when (and (eq start 1)
              end)
     ;; (message "SETUP %s %s" start end)
+    (delete-all-overlays)
     (when (boundp 'phps-mode/buffer-changes--start)
       (setq phps-mode/buffer-changes--start nil))
+    
     (phps-mode/BEGIN phps-mode/ST_INITIAL)))
 
 (defun phps-mode/lex--RUN ()
@@ -1343,8 +1345,9 @@ ANY_CHAR'
 (defun phps-mode/run-incremental-lex ()
   "Run incremental lexer based on `phps-mode/buffer-changes--start'."
   (when (boundp 'phps-mode/buffer-changes--start)
-    (message "Should run incremental lex here %s - %s" 
phps-mode/buffer-changes--start (point-max))
-    (semantic-lex phps-mode/buffer-changes--start (point-max))
+    (semantic-lex-buffer)
+    ;; TODO (message "Should run incremental lex here %s - %s" 
phps-mode/buffer-changes--start (point-max))
+    ;; TODO (semantic-lex phps-mode/buffer-changes--start (point-max))
     (setq phps-mode/buffer-changes--start nil)))
 
 (define-lex phps-mode/tags-lexer
diff --git a/sample-php-files/class.php b/sample-php-files/class.php
index c7ac743..e980006 100644
--- a/sample-php-files/class.php
+++ b/sample-php-files/class.php
@@ -15,9 +15,6 @@ class MyClass
     public function myMethod()
     {
         echo "Some stuff here"; // Just a comment
-        if ($this->var) {
-    
-    }
     }
 
     public function myMethod2() {



reply via email to

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