[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode b04da34 60/62: Fixed tests, only clearing ime
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode b04da34 60/62: Fixed tests, only clearing imenu when starting to process changes, if idle inteval is set to nil process changes directly |
Date: |
Tue, 20 Apr 2021 10:56:24 -0400 (EDT) |
branch: externals/phps-mode
commit b04da34fb9c38b93464160f6ea2928bbe0c89063
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Fixed tests, only clearing imenu when starting to process changes, if idle
inteval is set to nil process changes directly
---
phps-mode-lex-analyzer.el | 13 +++++++++----
test/phps-mode-test-lex-analyzer.el | 5 ++---
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/phps-mode-lex-analyzer.el b/phps-mode-lex-analyzer.el
index c340072..3e4384c 100644
--- a/phps-mode-lex-analyzer.el
+++ b/phps-mode-lex-analyzer.el
@@ -666,6 +666,7 @@
(message "Run process changes on buffer '%s'" buffer))
(when (get-buffer buffer)
(with-current-buffer buffer
+ (phps-mode-lex-analyzer--reset-imenu)
(let ((run-full-lexer nil)
(old-tokens phps-mode-lex-analyzer--tokens)
(old-states phps-mode-lex-analyzer--states)
@@ -2902,7 +2903,8 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
(defun phps-mode-lex-analyzer--after-change (start stop length)
"Track buffer change from START to STOP with LENGTH."
(phps-mode-debug-message
- (message "After change %s - %s, length: %s" start stop length))
+ (message
+ "After change %s - %s, length: %s, enabled: %s, idle-interval: %s" start
stop length phps-mode-lex-analyzer--allow-after-change-p
phps-mode-idle-interval))
(if phps-mode-lex-analyzer--allow-after-change-p
(progn
@@ -2912,15 +2914,18 @@ SQUARE-BRACKET-LEVEL and ROUND-BRACKET-LEVEL."
(when (and (boundp 'phps-mode-idle-interval)
phps-mode-idle-interval
(not phps-mode-lex-analyzer--idle-timer))
-
- (phps-mode-lex-analyzer--reset-imenu)
(phps-mode-lex-analyzer--start-idle-timer)
(phps-mode-serial--kill-active (buffer-name)))
(when (or
(not phps-mode-lex-analyzer--change-min)
(< start phps-mode-lex-analyzer--change-min))
- (setq phps-mode-lex-analyzer--change-min start)))
+ (setq phps-mode-lex-analyzer--change-min start))
+
+ (when (and
+ (boundp 'phps-mode-idle-interval)
+ (not phps-mode-idle-interval))
+ (phps-mode-lex-analyzer--process-changes (current-buffer))))
(phps-mode-debug-message (message "After change registration is
disabled"))))
(defun phps-mode-lex-analyzer--imenu-create-index ()
diff --git a/test/phps-mode-test-lex-analyzer.el
b/test/phps-mode-test-lex-analyzer.el
index e1c7f14..dde416b 100644
--- a/test/phps-mode-test-lex-analyzer.el
+++ b/test/phps-mode-test-lex-analyzer.el
@@ -269,7 +269,6 @@
"<?php\nif ($shippingMethod->id ===\n \\MyClass::METHOD_ID\n)
{\n "
))))
- (setq phps-mode-idle-interval nil)
(phps-mode-test--with-buffer
""
"Multi-line if block after opening parenthesis"
@@ -1306,7 +1305,7 @@
(phps-mode-test--with-buffer
"<?php\nnamespace myNamespace;\nclass myClass extends myAbstract/*
implements myInterface */{\n public function myFunctionA($myArg = null)
{}\n /* protected function myFunctionB($myArg = 'abc') {} */\n}"
- "Un-comment region were some of the region is already un-commented"
+ "Un-comment region were some of the region is already un-commented 1"
;; (message "Tokens %s" phps-mode-lexer-tokens)
(uncomment-region (point-min) (point-max))
(let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
@@ -1322,7 +1321,7 @@
(phps-mode-test--with-buffer
"<?php\n/** $var = '123'; */\n$var = 'abc';\n"
- "Un-comment region were some of the region is already un-commented"
+ "Un-comment region were some of the region is already un-commented 2"
;; (message "Tokens %s" phps-mode-lexer-tokens)
(uncomment-region (point-min) (point-max))
(let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
- [elpa] externals/phps-mode 86de51b 51/62: Fixed bug with incremental nesting stack, (continued)
- [elpa] externals/phps-mode 86de51b 51/62: Fixed bug with incremental nesting stack, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode a164e82 33/62: Updated README about PHP 8.0 lexer, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 5a3bee3 40/62: More work on implementing PHP 8.0 grammar, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode a4b641d 56/62: Improved Make-script for compile and clean, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode d56472c 50/62: Added precedence attributes to grammar, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode e92bed3 54/62: Started debugging failing indentation in some weird cases, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 3fb73ee 37/62: Added bookkeeping support of superglobals $argc, $argv and $http_response_header, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 2efba0b 38/62: Started on generated parser via emacs-parser-generator, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode fd971ee 48/62: Fixed missing lex-analyzer tokens, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode 30e1317 59/62: Removed test-file from master branch, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode b04da34 60/62: Fixed tests, only clearing imenu when starting to process changes, if idle inteval is set to nil process changes directly,
Christian Johansson <=
- [elpa] externals/phps-mode 1991912 49/62: Fixed bug in grammar syntax, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode afaf192 53/62: Resolved conflict, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode daff735 58/62: Removed debug output, Christian Johansson, 2021/04/20
- [elpa] externals/phps-mode b115fdc 57/62: Added ELPA copyright to file missing it, Christian Johansson, 2021/04/20