[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 9d6af11 157/405: More work on indentations
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 9d6af11 157/405: More work on indentations |
Date: |
Sat, 13 Jul 2019 10:00:04 -0400 (EDT) |
branch: externals/phps-mode
commit 9d6af116c2b11c1219e07b588be57b8a3eafb708
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
More work on indentations
---
phps-mode-lexer.el | 2 ++
phps-mode-test-functions.el | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el
index e1ea834..50a22f9 100644
--- a/phps-mode-lexer.el
+++ b/phps-mode-lexer.el
@@ -541,6 +541,8 @@
((looking-at "\\?>\n?")
(let ((start (match-beginning 0))
(end (match-end 0)))
+ (when (= (- end start) 3)
+ (setq end (1- end)))
(phps-mode-lexer-BEGIN phps-mode-lexer-ST_INITIAL)
(when phps-mode-lexer-PARSER_MODE
(phps-mode-lexer-RETURN_TOKEN ";" start end))
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index 3a2330a..53c5a7a 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -122,10 +122,11 @@
(phps-mode-test-with-buffer
"<html><head><title><?php if ($myCondition) {\nif ($mySeconCondition)
{\necho $title3;\n\n}\n?>\n</title><body>Bla bla</body></html>"
"Curly bracket test 4"
+ ;; (message "Tokens: %s" phps-mode-lexer-tokens)
(goto-char 110)
(phps-mode-functions-indent-line)
(let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
- (should (equal buffer-contents "<html><head><title><?php if
($myCondition) {\nif ($mySeconCondition) {\necho
$title3;\n\n}\n?>\n</title><body>Bla bla</body></html>"))))
+ (should (equal buffer-contents "<html><head><title><?php if
($myCondition) {\nif ($mySeconCondition) {\necho
$title3;\n\n}\n?>\n</title><body>Bla bla</body></html>"))))
(phps-mode-test-with-buffer
"<?php\n$variable = array(\n'random3'\n);\n$variable = true;\n"
- [elpa] externals/phps-mode 3f08b86 128/405: Updated tracking of alternative control structures, (continued)
- [elpa] externals/phps-mode 3f08b86 128/405: Updated tracking of alternative control structures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 52c502c 139/405: Improved logic for doc-comment tracking, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1472273 136/405: Begun working on new approach to indentation calculation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9792f70 133/405: Cleaning up code gather point meta information, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode cc947a9 140/405: Added more tests for new indentation function, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode d3e00f2 141/405: Starting on new function for indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c68c7a0 131/405: Fixed issue were first-token-on-line was nil, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c4ee0c3 132/405: Added more failing tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 0b3ced4 145/405: First test for new indentation function passes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 96588b5 142/405: More work on new indentation calculation functions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 9d6af11 157/405: More work on indentations,
Stefan Monnier <=
- [elpa] externals/phps-mode e249124 152/405: Prevent negative indent, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 4a27c44 147/405: Added support for naming unit tests to better find failures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b852f5f 160/405: All tests for indentation passes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode dfb0427 151/405: Added unit test for round and square bracket expressions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7b8cea3 163/405: Added failing indentation test for class multiple implements, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a61ff64 134/405: Renamed function get-point-data to get-current-line-data for better semantics, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b99da6b 153/405: Starting using new indentation calculation for indentations, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6559760 166/405: Work on assignments and class declaration indentations, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2720be8 165/405: Indentation calculation for heredoc and nowdoc assignments passes, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 13c4c78 164/405: More work on heredoc, Stefan Monnier, 2019/07/13