[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typescript-mode 1d32c6b3a8 066/222: Improve readability of
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typescript-mode 1d32c6b3a8 066/222: Improve readability of the code. |
Date: |
Sun, 6 Feb 2022 16:59:17 -0500 (EST) |
branch: elpa/typescript-mode
commit 1d32c6b3a83161ec2e97e544b4a538065e54b26f
Author: Louis-Dominique Dubeau <ldd@lddubeau.com>
Commit: Louis-Dominique Dubeau <ldd@lddubeau.com>
Improve readability of the code.
Flatten the code to a single `cond` instead of nested `cond` and
`if`. It makes the code easier to follow.
---
typescript-mode.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/typescript-mode.el b/typescript-mode.el
index 448a31e519..e6110bbad6 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -1809,14 +1809,15 @@ moved on success."
(loop named search-loop
do (progn
(cond
+ ;; Looking at the arrow of an arrow function:
+ ;; move back over the arrow.
+ ((looking-back "=>" (- (point) 2))
+ (backward-char 2))
+ ;; Looking at the end of the parameters list
+ ;; of a generic: move back over the list.
((eq (char-before) ?>)
- (if (looking-back "=>" (- (point) 2))
- ;; Move back over the arrow of an arrow function.
- (backward-char 2)
- ;; Otherwise, we are looking at the end of the
parameters
- ;; list of a generic. We need to move back over the
list.
- (backward-char)
- (typescript--backward-over-generic-parameter-list)))
+ (backward-char)
+ (typescript--backward-over-generic-parameter-list))
;; Looking at a union: skip over the character.
((eq (char-before) ?|)
(backward-char))
- [nongnu] elpa/typescript-mode 2405090403 152/222: Handle CI-failures correctly., (continued)
- [nongnu] elpa/typescript-mode 2405090403 152/222: Handle CI-failures correctly., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 895cd7f425 173/222: Fix indentation infinite looping, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 9db704ec1f 185/222: Fix duplicate test name, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 4832652496 163/222: Support electric-layout-mode., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 710f5425a4 189/222: Add tests for typescript-indent-list-items option, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 1fd835e7f8 205/222: Fix typos in README, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 30391a518a 079/222: Fix indentation issue with conditional operators., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 2d382d8bfb 053/222: Support rule names and severity in tslint reports., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 83579fac6e 070/222: Remove the explicit invocation of the mode hook., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode e700af4703 092/222: Use syntax-propertize-function to fontify regexps., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 1d32c6b3a8 066/222: Improve readability of the code.,
ELPA Syncer <=
- [nongnu] elpa/typescript-mode 46e032e932 054/222: Fix list of values compilation mode should use., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 56a1ea861f 082/222: Merge pull request #55 from bkruczyk/fix-regex-font-locking, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 0353bd72f8 133/222: Add bigint, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 18dc5a36a6 140/222: Fixes typo in the README file., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 36105abbb1 141/222: Add 26.1 to the versions we test on., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 08ceb01ff3 142/222: We no longer support 24.3, fixes #100., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode f33751e98f 145/222: Fix a case of bad indentation., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 1ec94013e7 146/222: Run emacs --version prior to running cask., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 871c23111a 157/222: rename to typescript-mode and move to root, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode f2761fb313 178/222: Extract type-name regexp into reusable constant., ELPA Syncer, 2022/02/06