[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode a967408f64 188/500: Don’t error when nix-shebang
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode a967408f64 188/500: Don’t error when nix-shebang fails. |
Date: |
Sat, 29 Jan 2022 08:27:05 -0500 (EST) |
branch: elpa/nix-mode
commit a967408f643b812e05bd239530915adffe27054d
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>
Don’t error when nix-shebang fails.
---
nix-shebang.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/nix-shebang.el b/nix-shebang.el
index f710703d73..fa17c3a4ca 100644
--- a/nix-shebang.el
+++ b/nix-shebang.el
@@ -20,7 +20,7 @@
(require 'files)
-(defvar nix-shebang-interpreter-regexp "#!nix-shell -i \\([^ \t\n]+\\)"
+(defvar nix-shebang-interpreter-regexp "#!\s*nix-shell -i \\([^ \t\n]+\\)"
"Regexp for nix-shell -i header.")
(defun nix-shebang-get-interpreter ()
@@ -34,13 +34,14 @@
(defun nix-shebang-mode ()
"Detect and run file’s interpreter mode."
(let ((mode (nix-shebang-get-interpreter)))
- (funcall (assoc-default mode
- (mapcar (lambda (e)
- (cons
- (format "\\`%s\\'" (car e))
- (cdr e)))
- interpreter-mode-alist)
- #'string-match-p))))
+ (when mode
+ (funcall (assoc-default mode
+ (mapcar (lambda (e)
+ (cons
+ (format "\\`%s\\'" (car e))
+ (cdr e)))
+ interpreter-mode-alist)
+ #'string-match-p)))))
;; WARNING: this will automatically modify interpreter-mode-alist
;; ideally we could make this opt-in
- [nongnu] elpa/nix-mode 64d615d628 096/500: Add nix-mode-mmm, (continued)
- [nongnu] elpa/nix-mode 64d615d628 096/500: Add nix-mode-mmm, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f968cb98ef 097/500: Add nix-buffer., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode c0502994b5 100/500: Remove nix-mode-reload., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 956280c161 116/500: Refactor nix--antiquote-close, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode de02e17924 135/500: Fix fontification of "}${" in some contexts, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0b19f975cd 143/500: Merge pull request #28 from pvmart/fix-nix-mmm, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 719482b701 148/500: Update customizations for Nix related modes., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode b3c6560f6d 166/500: Fix typo: rustfmt -> nixfmt, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 038dcf7b1b 147/500: Cleanup, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 3edda90cfd 146/500: Remove nix-flycheck, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a967408f64 188/500: Don’t error when nix-shebang fails.,
ELPA Syncer <=
- [nongnu] elpa/nix-mode 05d7c828b3 187/500: Fix nix-company and mmm-mode loading., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 281bfc1abf 176/500: Cleanup font-locks again, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 407051ad31 175/500: Add font-lock-tests.el file, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode d341ef2f70 195/500: Add missing defcustom type, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode eb7623fb3b 178/500: Handle mmm-mode '' prefixes better, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode cc88a55ead 173/500: Add custom faces for Nix., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0181c35a4f 202/500: Add nix-unpack command., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0ac0271f6c 201/500: Update Homepage in .el files, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 39f29d8be4 207/500: Replace indentation code with simpler heuristics, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 57ac40d53b 214/500: Merge pull request #45 from eqyiel/master, ELPA Syncer, 2022/01/29