emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/nix-mode 023a471576 329/500: Remove unnecessary while loop


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode 023a471576 329/500: Remove unnecessary while loop.
Date: Sat, 29 Jan 2022 08:27:18 -0500 (EST)

branch: elpa/nix-mode
commit 023a4715764dd195ece52da422e4835e0968dd41
Author: Jakub Piecuch <j.piecuch96@gmail.com>
Commit: Jakub Piecuch <j.piecuch96@gmail.com>

    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

[Prev in Thread] Current Thread [Next in Thread]