branch: elpa/nix-mode
commit 023a4715764dd195ece52da422e4835e0968dd41
Author: Jakub Piecuch <[email protected]>
Commit: Jakub Piecuch <[email protected]>

    Remove unnecessary while loop.
---
 nix-mode.el | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/nix-mode.el b/nix-mode.el
index 1a41d83705..edc154c18b 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -565,11 +565,8 @@ STRING-TYPE type of string based off of Emacs syntax table 
types"
 
 (defun nix-smie--nonsep-semicolon-p ()
   "Whether the semicolon at point terminates a `with' or `assert'."
-  (let (tok)
-    (save-excursion
-      ;; Skip over identifiers, balanced parens etc. as far back as we can.
-      (while (null (setq tok (nth 2 (smie-backward-sexp " -bexpskip- "))))))
-    (member tok '("with" "assert"))))
+  (save-excursion
+    (member (nth 2 (smie-backward-sexp " -bexpskip- ")) '("with" "assert"))))
 
 (defun nix-smie--arg-?-p ()
   "Whether the question mark at point is part of an argument declaration."

Reply via email to