[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode bf633d2 061/405: Added test for indent of fin
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode bf633d2 061/405: Added test for indent of final line of doc comment block |
Date: |
Sat, 13 Jul 2019 09:59:43 -0400 (EDT) |
branch: externals/phps-mode
commit bf633d2d60859e196a1094a0097aae8c8f973699
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added test for indent of final line of doc comment block
---
phps-functions.el | 8 +++++---
phps-test-functions.el | 10 +++++++++-
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/phps-functions.el b/phps-functions.el
index 8b20457..8115cf1 100644
--- a/phps-functions.el
+++ b/phps-functions.el
@@ -113,7 +113,10 @@
(when (string= major-mode "phps-mode")
(when (and (not phps-mode/buffer-changes--start)
(boundp 'phps-mode/idle-interval))
- (run-with-idle-timer phps-mode/idle-interval nil
#'phps-mode/run-incremental-lex))
+ (run-with-idle-timer phps-mode/idle-interval nil #'phps-mode/lex--RUN)
+ ;; TODO Maybe use incremental lexer once it's working
+ ;; (run-with-idle-timer phps-mode/idle-interval nil
#'phps-mode/run-incremental-lex)
+ )
(when (or (not phps-mode/buffer-changes--start)
(< start phps-mode/buffer-changes--start))
;; (message "Setting %s to %s" phps-mode/buffer-changes--start start)
@@ -172,8 +175,7 @@
(")" (setq start-parenthesis-level (-
start-parenthesis-level 1)))
(_)))
- (when (and (> token-end line-end)
- (< token-start line-beginning)
+ (when (and (< token-start line-beginning)
(eq token 'T_DOC_COMMENT))
(setq line-in-doc-comment t))
diff --git a/phps-test-functions.el b/phps-test-functions.el
index 17cced3..1ead7e7 100644
--- a/phps-test-functions.el
+++ b/phps-test-functions.el
@@ -108,6 +108,14 @@
(should (equal buffer-contents "<?php\n/**\n* My first line\n* My second
line\n**/\n"))))
(phps-mode/with-test-buffer
+ "<?php\n/**\n* My first line\n* My second line\n**/\n"
+ (goto-char 46)
+ (phps-mode/indent-line)
+ ;; (message "Tokens %s point %s" phps-mode/lexer-tokens (point))
+ (let ((buffer-contents (buffer-substring-no-properties (point-min)
(point-max))))
+ (should (equal buffer-contents "<?php\n/**\n* My first line\n* My second
line\n **/\n"))))
+
+ (phps-mode/with-test-buffer
"<?php\n$variable = array(\n'random4');\n$variable = true;\n"
(goto-char 29)
(phps-mode/indent-line)
@@ -184,7 +192,7 @@
(phps-mode/with-test-buffer
"<?php /**\n * My first line\n * My second line\n **/"
(goto-char 50)
- (should (equal (list (list t 0 0 0 nil nil) (list t 0 0 0 nil nil))
(phps-mode/get-point-data))))
+ (should (equal (list (list t 0 0 0 nil t) (list t 0 0 0 nil t))
(phps-mode/get-point-data))))
(phps-mode/with-test-buffer
"<?php\n$variable = array(\n'random4');\n$variable = true;\n"
- [elpa] externals/phps-mode 3824abf 060/405: Resolved indent with trailing parenthesis, (continued)
- [elpa] externals/phps-mode 3824abf 060/405: Resolved indent with trailing parenthesis, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a61cb8b 062/405: Fixed issue with doc comment indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6c597fb 065/405: Updated readme, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 0ca9fe8 058/405: Detection of point inside doc comment block improved, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 67f9a7a 057/405: Moved lexer-get-point-data to functions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 27cd705 069/405: Updated readme, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 58300fd 070/405: More updates of readme, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 86ec35f 066/405: Incremental lexer working somewhat, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode ec71e15 074/405: Fixed bug where token-numbers are not defined, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 236f05e 071/405: Updated makefile to not use hard-coded path to emacs, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode bf633d2 061/405: Added test for indent of final line of doc comment block,
Stefan Monnier <=
- [elpa] externals/phps-mode ba8165a 063/405: Fixed bug with brace count not including braces inside double quoted strings, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 99dfc68 067/405: Incremental-lexer deletes affected overlays, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 90d059c 064/405: Fixed bug in incremental lexer logic, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 1be9270 068/405: Updated README, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e57f1e1 075/405: Skipping indentation if it's already correct, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c57fb5b 073/405: Improved indentation of trailing opening brace, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 5e30a65 076/405: Added TODO items, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 94d4814 078/405: Added test for moving lexer tokens, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a59ef7b 079/405: More unit tests for moving lexer token positions, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 287d934 077/405: Updated comments are made un-tested function for moving token positions, Stefan Monnier, 2019/07/13