From 15d85a5c74d1261dba1148a9483d313de0d2f35b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 2 Feb 2021 04:48:03 -0500 Subject: [PATCH] Fix nix-mode for nix-shell shell scripts Wasn't correctly detecting the interpreter argument for nix-shell shebangs. It must be done in two parts in case cached-nix-shell is used (which means the shebang will span 2+ lines). --- modules/lang/nix/autoload.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/nix/autoload.el b/modules/lang/nix/autoload.el index cf345407e..d28319f12 100644 --- a/modules/lang/nix/autoload.el +++ b/modules/lang/nix/autoload.el @@ -53,7 +53,8 @@ (save-excursion (goto-char (point-min)) (save-match-data - (if (not (re-search-forward "#! *\\(?:cached-\\)?nix-shell +-i +\\([^ \n]+\\)" 256 t)) + (if (not (and (re-search-forward "\\_