[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typescript-mode c9b22f5f33 215/222: Merge pull request #15
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typescript-mode c9b22f5f33 215/222: Merge pull request #152 from Rogach/pr/fix-indentation-when-lexical-scoping |
Date: |
Sun, 6 Feb 2022 16:59:33 -0500 (EST) |
branch: elpa/typescript-mode
commit c9b22f5f338c4efa138a79d551c4cc4a9e9e7826
Merge: 6918f3f6d7 47b7fd239e
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: GitHub <noreply@github.com>
Merge pull request #152 from Rogach/pr/fix-indentation-when-lexical-scoping
fix eval invocation in typescript--re-search-backward to work with lexical
scoping
---
typescript-mode-lexical-binding-tests.el | 25 +++++++++++++++++++++++++
typescript-mode-tests.el | 1 +
typescript-mode.el | 6 +++---
3 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/typescript-mode-lexical-binding-tests.el
b/typescript-mode-lexical-binding-tests.el
new file mode 100644
index 0000000000..9f217e3caa
--- /dev/null
+++ b/typescript-mode-lexical-binding-tests.el
@@ -0,0 +1,25 @@
+;; -*- lexical-binding: t -*-
+;;; typescript-mode-lexical-binding-tests --- This file contains test for
typescript-mode.el under enabled lexical-binding
+
+;;; Commentary:
+;; To know how to run the tests, see typescript-mode-tests.el
+
+(require 'ert)
+
+;; reload typescript-mode with lexical-binding enabled
+(with-temp-buffer
+ (insert-file-contents "typescript-mode.el")
+ (ignore-errors
+ (while (setq sexp (read (current-buffer)))
+ (eval sexp t))))
+
+(require 'typescript-mode-test-utilities)
+
+(ert-deftest lexical-binding--indentation-does-not-throw-error ()
+ (with-temp-buffer
+ (insert-file-contents "test-files/indentation-reference-document.ts")
+ (typescript-mode)
+ (goto-line 2)
+ (typescript-indent-line)))
+
+(provide 'typescript-mode-lexical-binding-tests)
diff --git a/typescript-mode-tests.el b/typescript-mode-tests.el
index 1c8aa75fa2..7ff8b212fe 100644
--- a/typescript-mode-tests.el
+++ b/typescript-mode-tests.el
@@ -11,6 +11,7 @@
(require 'typescript-mode-test-utilities)
(require 'typescript-mode-general-tests)
(require 'typescript-mode-jsdoc-tests)
+(require 'typescript-mode-lexical-binding-tests)
(provide 'typescript-mode-tests)
diff --git a/typescript-mode.el b/typescript-mode.el
index 8fb2ff41b0..ef4f0e55b9 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -992,11 +992,11 @@ one at the end of the line with \"let a\"."
(let ((saved-point (point))
(search-expr
(cond ((null count)
- '(typescript--re-search-backward-inner regexp bound 1))
+ `(typescript--re-search-backward-inner ,regexp ,bound 1))
((< count 0)
- '(typescript--re-search-forward-inner regexp bound (- count)))
+ `(typescript--re-search-forward-inner ,regexp ,bound (-
,count)))
((> count 0)
- '(typescript--re-search-backward-inner regexp bound count)))))
+ `(typescript--re-search-backward-inner ,regexp ,bound
,count)))))
(condition-case err
(eval search-expr)
(search-failed
- [nongnu] elpa/typescript-mode a5f342e539 160/222: Add snake_cased function call to regression test suite, (continued)
- [nongnu] elpa/typescript-mode a5f342e539 160/222: Add snake_cased function call to regression test suite, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 6eaddf6c17 162/222: Drop the custom insert-and-indent code in favor of electric-indent., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 0fc7297870 184/222: Add compilation-mode support for ng lint too., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode b6cd68ae77 177/222: Add test-cases for type-highlights supported so far., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 102587e458 183/222: Merge pull request #132 from jkdufair/master, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode e6f68ab2dd 198/222: Fontify basic types over keywords., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode fb44319479 197/222: Merge pull request #125 from Fuco1/fix/prefer-constant-over-keyword, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode ae32e1c28f 193/222: Use ‘insert-file-contents’ instead of ‘find-file’ for tests., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode bbbe50aade 194/222: Merge pull request #140 from phst/find-file, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 996fb729ca 201/222: Update README.md, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode c9b22f5f33 215/222: Merge pull request #152 from Rogach/pr/fix-indentation-when-lexical-scoping,
ELPA Syncer <=
- [nongnu] elpa/typescript-mode 47b7fd239e 214/222: add a test for error thrown if typescript-mode is loaded with lexical scoping enabled, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 49ff1149e2 218/222: Add `override` to the list of highlighted keywords, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 36f685251f 008/222: Merge pull request #2 from quanticle/master, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 5a3c84247d 007/222: Typescript added the "protected" keyword in 1.3., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 49241bcc1f 011/222: Merge pull request #3 from OrangeShark/typescript1.5, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode ad8f356cbe 021/222: Merge pull request #15 from valerian/bool, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 39827549ef 017/222: Merge pull request #13 from wingyplus/highlight-set-and-get-keyword, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 266be8f6c7 018/222: added "readonly" keyword, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 588d5f3d63 027/222: Update README.md, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode f72826e564 036/222: Merge pull request #25 from ananthakumaran/revert-24-wrong-cursor-position, ELPA Syncer, 2022/02/06