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

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

[nongnu] elpa/nix-mode 004c81e51d 362/500: Merge branch 'master' into fi


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode 004c81e51d 362/500: Merge branch 'master' into fix-94
Date: Sat, 29 Jan 2022 08:27:21 -0500 (EST)

branch: elpa/nix-mode
commit 004c81e51d4f7c1ff03dde1fc70c5b6b79409b73
Merge: 9242165717 ecf005009e
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>

    Merge branch 'master' into fix-94
---
 Makefile    |  2 +-
 nix-mode.el | 17 +++++++++++------
 nix.el      | 10 +++++-----
 3 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index 3f3b0c24f1..e2199120ba 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,7 @@ run:
 
 %.texi: %.org
        emacs   --batch \
-               -l ox-extra -l org-man -l ox-texinfo $< \
+               -l ox-extra -l ox-texinfo $< \
                -f org-texinfo-export-to-texinfo
 
 %.info: %.texi
diff --git a/nix-mode.el b/nix-mode.el
index ebb4b6eb3c..31c8efa1b1 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -4,7 +4,7 @@
 ;; Homepage: https://github.com/NixOS/nix-mode
 ;; Version: 1.4.1
 ;; Keywords: nix, languages, tools, unix
-;; Package-Requires: ((emacs "24.3"))
+;; Package-Requires: ((emacs "25"))
 
 ;; This file is NOT part of GNU Emacs.
 
@@ -162,7 +162,7 @@ KEYWORDS a list of strings to match as Nix keywords."
     (modify-syntax-entry ?\n "> b" table)
     (modify-syntax-entry ?_ "_" table)
     (modify-syntax-entry ?. "'" table)
-    (modify-syntax-entry ?- "'" table)
+    (modify-syntax-entry ?- "_" table)
     (modify-syntax-entry ?' "'" table)
     (modify-syntax-entry ?= "." table)
     (modify-syntax-entry ?< "." table)
@@ -970,10 +970,15 @@ The hook `nix-mode-hook' is run when Nix mode is started.
                :forward-token 'nix-smie--forward-token
                :backward-token 'nix-smie--backward-token)
     (setq-local smie-indent-basic 2)
-    (fset (make-local-variable 'smie-indent-exps)
-         (symbol-function 'nix-smie--indent-exps))
-    (fset (make-local-variable 'smie-indent-close)
-         (symbol-function 'nix-smie--indent-close)))
+
+    (let ((nix-smie-indent-functions
+           ;; Replace the smie-indent-* equivalents with nix-mode's.
+           (mapcar (lambda (fun) (pcase fun
+                                   ('smie-indent-exps  'nix-smie--indent-exps)
+                                   ('smie-indent-close 'nix-smie--indent-close)
+                                   (_ fun)))
+                   smie-indent-functions)))
+      (setq-local smie-indent-functions nix-smie-indent-functions)))
 
   ;; Automatic indentation [C-j]
   (setq-local indent-line-function (lambda ()
diff --git a/nix.el b/nix.el
index 3261e075b4..eddabb79c4 100644
--- a/nix.el
+++ b/nix.el
@@ -22,27 +22,27 @@
   "Nix-related customizations"
   :group 'languages)
 
-(defcustom nix-executable (executable-find "nix")
+(defcustom nix-executable "nix"
   "Nix executable location."
   :group 'nix
   :type 'string)
 
-(defcustom nix-build-executable (executable-find "nix-build")
+(defcustom nix-build-executable "nix-build"
   "Nix-build executable location."
   :group 'nix
   :type 'string)
 
-(defcustom nix-instantiate-executable (executable-find "nix-instantiate")
+(defcustom nix-instantiate-executable "nix-instantiate"
   "Nix executable location."
   :group 'nix
   :type 'string)
 
-(defcustom nix-store-executable (executable-find "nix-store")
+(defcustom nix-store-executable "nix-store"
   "Nix executable location."
   :group 'nix
   :type 'string)
 
-(defcustom nix-shell-executable (executable-find "nix-shell")
+(defcustom nix-shell-executable "nix-shell"
   "Location of ‘nix-shell’ executable."
   :group 'nix
   :type 'string)



reply via email to

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