[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode d27af61 327/405: Fixed bug with incremental l
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode d27af61 327/405: Fixed bug with incremental lexer were states are missing |
Date: |
Sat, 13 Jul 2019 10:00:42 -0400 (EDT) |
branch: externals/phps-mode
commit d27af6190843443142a33af404820c899f65bf76
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Fixed bug with incremental lexer were states are missing
---
phps-mode-lexer.el | 6 +++---
phps-mode-test-integration.el | 9 +++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index 992fcc3..6da9ffa 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -1684,7 +1684,7 @@
(defun phps-mode-lexer-run-incremental ()
"Run incremental lexer based on
`(phps-mode-functions-get-buffer-changes-start)'."
;; (message "Running incremental lexer")
- (when (and (phps-mode-functions-get-buffer-changes-start)
+ (when (and (> (phps-mode-functions-get-buffer-changes-start) 1)
phps-mode-lexer-states)
(let ((state nil)
(state-stack nil)
@@ -1694,7 +1694,6 @@
(previous-token-start nil)
(previous-token-end nil)
(tokens phps-mode-lexer-tokens))
- ;; (message "Looking for state to rewind to for %s in stack %s"
change-start states)
;; Find state and state stack before point of change
;; also determine were previous token to change starts
@@ -1744,7 +1743,8 @@
))
;; (display-warning "phps-mode" (format "Found no state to rewind to
for %s in stack %s, buffer point max: %s" change-start states (point-max)))
- (phps-mode-lexer-run))))
+ )))
+ (phps-mode-lexer-run)
(phps-mode-functions-reset-buffer-changes-start))
(define-lex phps-mode-lexer-lex
diff --git a/phps-mode-test-integration.el b/phps-mode-test-integration.el
index 2c80f8b..7d8d7ef 100644
--- a/phps-mode-test-integration.el
+++ b/phps-mode-test-integration.el
@@ -69,6 +69,15 @@
(execute-kbd-macro (kbd "<backspace>"))
(should (equal (phps-mode-functions-get-buffer-changes-start) 55)))
+ (phps-mode-test-incremental-vs-intial-buffer
+ ""
+ "Integration-test 3 for function-oriented PHP"
+
+ ;; Make changes
+ (goto-char 1)
+ (insert "<?php\nfunction myFunctionA()\n{\n echo 'my second
statement';\n}\n")
+ (should (equal (phps-mode-functions-get-buffer-changes-start) 1)))
+
)
(defun phps-mode-test-integration ()
- [elpa] externals/phps-mode ced201d 322/405: Updated syntax colouring for namespace, class, function and constant names, (continued)
- [elpa] externals/phps-mode ced201d 322/405: Updated syntax colouring for namespace, class, function and constant names, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 8298a6a 325/405: Colorized strings after namespace separator, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a30e5ff 331/405: Run incremental lexer when processing file if buffer change, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e9475f7 321/405: Merge branch 'master' of https://github.com/cjohansson/emacs-phps-mode, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 55b3087 333/405: Optimized lexer calling, do not call when using (indent-line), Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a309998 326/405: Integration tests passes with new function, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c37b234 334/405: Added failing test for indent in concatenated string inside function arguments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 8109c1a 328/405: (uncomment-region) working, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9e62157 338/405: (comment-region) and (uncomment-region) now handles part of lines as well as full lines, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 091ab21 340/405: Passes new unit test for indentation of concatenated equal and multiplication equal assignments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d27af61 327/405: Fixed bug with incremental lexer were states are missing,
Stefan Monnier <=
- [elpa] externals/phps-mode 32f9808 329/405: indent and imenu now triggers incremental lexer if buffer changed, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 365d739 324/405: Changed structure of integration tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2807902 343/405: Added syntax coloring for %, =, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1bac28a 352/405: Updated readme with decreased percent for indent, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2801604 350/405: Added TODO item, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c80aa68 351/405: Added a new failing test for indentation of else expression inside switch, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a8fbe7d 344/405: Improved syntax coloring of =, % and more, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 64e1789 356/405: Fixed indentation were assignments end at next line, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 83d5de8 355/405: Removed uneccesary debug output in unit test, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode abd78a0 359/405: Work on incremental newline logic, Stefan Monnier, 2019/07/13