[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode 5d7cf21c37 2/2: Merge pull request #179 from fo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode 5d7cf21c37 2/2: Merge pull request #179 from fommil/organise |
Date: |
Tue, 25 Oct 2022 11:59:24 -0400 (EDT) |
branch: elpa/scala-mode
commit 5d7cf21c37e345c49f921fe5111a49fd54efd1e0
Merge: 8c3ce0168d a4efa6aced
Author: Heikki Vesalainen <heikkivesalainen@yahoo.com>
Commit: GitHub <noreply@github.com>
Merge pull request #179 from fommil/organise
scala-organise cleanup
---
scala-organise.el | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/scala-organise.el b/scala-organise.el
index 450cffa868..38d9b08af2 100644
--- a/scala-organise.el
+++ b/scala-organise.el
@@ -28,7 +28,7 @@
(goto-char 0)
(let (;; alist of the form ("prefix." ("Symbol", "_", "etc"))
(imports))
- (when (re-search-forward (rx line-start "import "))
+ (when (re-search-forward (rx line-start "import ") nil t)
(forward-line 0)
(let ((start (point)))
(while (looking-at (rx (or "\n" (: "import " (group (+ (not (or "{"
"\n"))))))))
@@ -62,10 +62,9 @@
(dolist (key keys)
(insert (scala-organise--render (assoc key imports))))
(when keys
- (insert "\n"))))))
-
- (when (re-search-forward (rx line-start (* space) "import "))
- (message "Inline imports, starting at line %i, have not been organised."
(line-number-at-pos)))))
+ (insert "\n")))))
+ (when (re-search-forward (rx line-start (* space) "import ") nil t)
+ (message "Inline imports, starting at line %i, have not been
organised." (line-number-at-pos))))))
(defun scala-organise--special-p (entry setting)
"Return non-nil if the ENTRY string matches the SETTING (a string
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/scala-mode 5d7cf21c37 2/2: Merge pull request #179 from fommil/organise,
ELPA Syncer <=