[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode e8c8a51 169/217: Couple imenu-related issues (#
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode e8c8a51 169/217: Couple imenu-related issues (#95) |
Date: |
Sun, 29 Aug 2021 11:31:06 -0400 (EDT) |
branch: elpa/scala-mode
commit e8c8a51d55c27d52118d3b3f4aa4817cdc70414f
Author: Igor Shymko <igor.shimko@gmail.com>
Commit: Sam Halliday <sam.halliday@gmail.com>
Couple imenu-related issues (#95)
* Fix couple imenu related issues
* Lisp nesting exceeds `max-lisp-eval-depth' error in
`scala-syntax:handle-brace-equals-or-next`
in SBT build scripts not ending with closing braces.
* Scan error: "Containing expression ends prematurely"
in files like:
```
object X {
object Y
}
```
* Add word boundaries for `scala-syntax:definition-words-re`.
This prevents case insensitive match like:
`class X extends Default {}`. Def in Default doesn't match in this case.
* Unreverse the order of nested imenu-index items
---
scala-mode2-imenu.el | 13 +++++++------
scala-mode2-syntax.el | 16 +++++++++-------
2 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/scala-mode2-imenu.el b/scala-mode2-imenu.el
index 5eec53a..9bc9c77 100644
--- a/scala-mode2-imenu.el
+++ b/scala-mode2-imenu.el
@@ -97,12 +97,13 @@
(defun scala-imenu:nested-members ()
(let ((start-point (point)))
- (save-excursion (scala-syntax:end-of-definition)
- ;; This gets us inside of the class definition
- ;; It seems like there should be a better way
- ;; to do this.
- (backward-char)
- (scala-imenu:get-nested-members start-point))))
+ (save-excursion
+ (scala-syntax:end-of-definition)
+ ;; This gets us inside of the class definition
+ ;; It seems like there should be a better way
+ ;; to do this.
+ (backward-char)
+ (reverse (scala-imenu:get-nested-members start-point)))))
(defvar scala-imenu:nested-definition-types '("class" "object" "trait"))
diff --git a/scala-mode2-syntax.el b/scala-mode2-syntax.el
index 80cc8cc..401f529 100644
--- a/scala-mode2-syntax.el
+++ b/scala-mode2-syntax.el
@@ -922,7 +922,7 @@ not. A list must be either enclosed in parentheses or start
with
(defconst scala-syntax:all-definition-re
(scala-syntax:build-definition-re
- (concat "\\(?1:" scala-syntax:definition-words-re "\\)")))
+ (concat "\\(?1:" scala-syntax:definition-words-re "\\)\\b")))
;; Functions to help with beginning and end of definitions.
@@ -968,12 +968,14 @@ val a, b = (1, 2)
(lambda () (condition-case ex (scala-syntax:forward-sexp-or-next-line)
('error nil)))))))
(defun scala-syntax:handle-brace-equals-or-next ()
- (cond ((looking-at "[[:space:]]*{") (forward-sexp))
- ((looking-at "[[:space:]]*=") (scala-syntax:forward-sexp-or-next-line)
- (scala-syntax:handle-brace-equals-or-next))
- ((looking-at scala-syntax:all-definition-re) nil)
- (t (scala-syntax:forward-sexp-or-next-line)
- (scala-syntax:handle-brace-equals-or-next))))
+ (cond ((eobp) nil)
+ ((looking-at "[[:space:]]*{") (forward-sexp))
+ ((looking-at "[[:space:]]*=") (scala-syntax:forward-sexp-or-next-line)
+ (scala-syntax:handle-brace-equals-or-next))
+ ((looking-at scala-syntax:all-definition-re) nil)
+ ((looking-at "[[:space:]]*\n[[:space:]]*}") (skip-syntax-forward
"[[:space:]]*\n[[:space:]]*}"))
+ (t (scala-syntax:forward-sexp-or-next-line)
+ (scala-syntax:handle-brace-equals-or-next))))
(defun scala-syntax:movement-function-until-re (re movement-function)
(save-excursion
- [nongnu] elpa/scala-mode d357a77 038/217: New 'scala-indent:align-parameters' customization variable, (continued)
- [nongnu] elpa/scala-mode d357a77 038/217: New 'scala-indent:align-parameters' customization variable, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode af0e387 053/217: Fixes #18: highlight escapes in strings after chars, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode bc446e7 120/217: sbt support is now in sbt-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 597d421 145/217: Seems the imenu var needs to be set in a very local way., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c154f16 139/217: better join-line and fixup-whitespace, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode e277378 143/217: WIP on end-of-defun and beggining of defun which should make writing imenu functionality much easier., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 811494f 155/217: Support nesting of classes in imenu index creation function., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d4885ac 159/217: Use [[:space:]] instead of literal space in syntax end/beggining of, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c5ab657 160/217: Merge pull request #82 from IvanMalison/support_imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode b8e835f 161/217: scala-mode:goto-start-of-code close #90, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode e8c8a51 169/217: Couple imenu-related issues (#95),
ELPA Syncer <=
- [nongnu] elpa/scala-mode 3989897 174/217: bump version (#111), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 360b5ba 162/217: Merge pull request #92 from fommil/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 387e93c 178/217: revert 618f0fbef4d3d94156f834a66e36c79f07a54e02, fixes #118 (#119), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c71efcc 188/217: quoteids are now propertized as symbols (#137), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 1d08e88 201/217: Merge pull request #154 from pgronkievitz/patch-1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 265dadc 214/217: fix: `//`-comments filled incorrectly (`//` not acting as prefix), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode b85fa5e 213/217: Merge pull request #167 from Kazark/trailing-comma, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 6966328 216/217: Merge pull request #168 from Kazark/slash-slash, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode e23875e 054/217: Fixed number literals not highlighting after foo_123, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 3142f5c 071/217: Fixed #26, ELPA Syncer, 2021/08/29