[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 1389a6b25a 275/500: Fix flycheck warnings
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 1389a6b25a 275/500: Fix flycheck warnings |
Date: |
Sat, 29 Jan 2022 08:27:13 -0500 (EST) |
branch: elpa/nix-mode
commit 1389a6b25a22328f2a1333718882c7aa8a1f42c4
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>
Fix flycheck warnings
Some missing documentation...
---
nix-mode.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/nix-mode.el b/nix-mode.el
index 07acf0362a..8d665f77dd 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -21,6 +21,7 @@
(require 'nix-shell)
(require 'nix-repl)
(require 'ffap)
+(require 'subr-x)
(defgroup nix-mode nil
"Nix mode customizations"
@@ -349,10 +350,12 @@ STRING-TYPE type of string based off of Emacs syntax
table types"
;;; Indentation
(defun nix--inside-string-or-comment ()
+ "Determine whether we are inside of a string or comment."
(or (nix--get-string-type (nix--get-parse-state (point)))
(nth 4 (syntax-ppss))))
(defun nix-find-backward-matching-token ()
+ "Find the previous Nix token."
(cond
((looking-at "in\\b")
(let ((counter 1))
@@ -372,6 +375,7 @@ STRING-TYPE type of string based off of Emacs syntax table
types"
))
(defun nix-indent-to-backward-match ()
+ "Match the previous line’s indentation."
(let ((matching-indentation (save-excursion
(beginning-of-line)
(skip-chars-forward "[:space:]")
@@ -381,7 +385,8 @@ STRING-TYPE type of string based off of Emacs syntax table
types"
)
(defun nix-mode-make-regexp (parts)
- "Combine the regexps into a single or-delimited regexp."
+ "Combine the regexps into a single or-delimited regexp.
+PARTS a list of regexps"
(declare (indent defun))
(string-join parts "\\|"))
@@ -412,6 +417,7 @@ STRING-TYPE type of string based off of Emacs syntax table
types"
(re-search-backward (nix-mode-combined-regexp) nil t))
(defun nix-indent-expression-start ()
+ "Indent the start of a nix expression."
(let* ((ends 0)
(once nil)
(done nil)
@@ -465,16 +471,16 @@ STRING-TYPE type of string based off of Emacs syntax
table types"
;;;###autoload
(defun nix-mode-format ()
- "Format the entire nix-mode buffer"
+ "Format the entire nix-mode buffer."
(interactive)
(when (eq major-mode 'nix-mode)
(save-excursion
- (beginning-of-buffer)
+ (goto-char (point-min))
(while (not (equal (point) (point-max)))
(if (equal (string-match-p "^[\s-]*$" (thing-at-point 'line)) 0)
(delete-horizontal-space)
(nix-indent-line))
- (next-line)))))
+ (forward-line)))))
;;;###autoload
(defun nix-indent-line ()
- [nongnu] elpa/nix-mode 5aaf80392f 231/500: Avoid recursive loop, (continued)
- [nongnu] elpa/nix-mode 5aaf80392f 231/500: Avoid recursive loop, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 3aeec264e0 236/500: nix-search: add nix-search-read-attr, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode fea066cec6 241/500: Fix run phase, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 6532fcf244 244/500: Don’t expand nix-file in nix-shell., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 097b7bb992 257/500: Add nix-build.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a6571fa877 260/500: Add nix-log.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0c2807f037 262/500: Cleanup nix-build.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode b62c395b65 264/500: Remove nix-shell-haskell.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1dd112e5cf 267/500: Fix function used as variable, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f1973ceb4b 269/500: Add .nix to auto-mode-alist, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1389a6b25a 275/500: Fix flycheck warnings,
ELPA Syncer <=
- [nongnu] elpa/nix-mode 95ef285e74 277/500: Update .nix script, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1ade7b76bd 282/500: ert/indent: Add testcase for contents of lists, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 02b59d9bcf 283/500: ert/indent: Add testcases for issues reported in #60, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode bb602e160f 286/500: Cleanups, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7526a43ea0 292/500: tests: Rename test for consistency with the rest, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode aa47e0c5ae 302/500: Fix indentation of lambdas starting at bol., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode e744c602fd 304/500: Replace regex operations with faster alternatives in the lexer., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 8721f63650 310/500: Merge pull request #79 from j-piecuch/smie, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 5fcdd667de 312/500: Make smie-indent-line the default indent function, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode b902e15c1f 003/500: Create nix-mode.el, ELPA Syncer, 2022/01/29