File tree 5 files changed +15
-13
lines changed
5 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 1
1
.PHONY : test clean install run
2
2
3
- ELS = nix.el nix-company.el nix-drv-mode.el nix-format.el \
3
+ ELS = nix.el nix-company.el nix-drv-mode.el nix-flake.el nix- format.el \
4
4
nix-instantiate.el nix-mode.el nix-mode-mmm.el \
5
5
nix-prettify-mode.el nix-repl.el nix-search.el nix-shebang.el \
6
6
nix-shell.el nix-store.el
7
7
ELCS = $(ELS:.el=.elc )
8
8
9
+ DOCS = nix-mode.pdf nix-mode.html nix-mode.info
10
+
9
11
TESTS = tests/nix-mode-tests.el tests/nix-font-lock-tests.el
10
12
11
13
DESTDIR =
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ ATTR the attribute to find in nix expressions."
27
27
(call-process nix-executable nil (list stdout nil ) nil
28
28
" edit" " -f" file attr)
29
29
(with-current-buffer stdout
30
- (when (eq (buffer-size ) 0 )
30
+ (when (zerop (buffer-size ))
31
31
(error
32
32
" Error: nix edit failed to produce any output" ))
33
33
(setq result (substring (buffer-string ) 0 (- (buffer-size ) 1 ))))
Original file line number Diff line number Diff line change 13
13
:group 'nix
14
14
:type 'string )
15
15
16
- (if (fboundp 'replace-buffer-contents )
17
- (defun nix--replace-buffer-contents (src dst )
18
- (with-current-buffer dst (replace-buffer-contents src)))
19
- (defun nix--replace-buffer-contents (src dst )
20
- (if (not (string= (with-current-buffer src (buffer-string ))
21
- (with-current-buffer dst (buffer-string ))))
22
- (with-current-buffer src
23
- (copy-to-buffer dst (point-min ) (point-max ))))))
16
+ (defun nix--replace-buffer-contents (src dst )
17
+ (if (fboundp 'replace-buffer-contents )
18
+ (with-current-buffer dst (replace-buffer-contents src))
19
+ (unless (string= (with-current-buffer src (buffer-string ))
20
+ (with-current-buffer dst (buffer-string )))
21
+ (with-current-buffer src
22
+ (copy-to-buffer dst (point-min ) (point-max ))))))
24
23
25
24
(defun nix--format-call (buf nixfmt-bin )
26
25
" Format BUF using nixfmt."
Original file line number Diff line number Diff line change 20
20
(nix--process-json-nocheck " search" " --json"
21
21
(unless use-flakes " --file" ) file
22
22
(when no-cache " --no-cache" )
23
- (unless (string= " " search) search)))
23
+ (unless (string-empty-p search) search)))
24
24
25
25
(defface nix-search-pname
26
26
'((t :height 1.5
Original file line number Diff line number Diff line change 22
22
:group 'nix )
23
23
24
24
(defcustom nix-store-path-omit-self t
25
- " Do not list the current entry itself within sections of nix-store-path-mode."
26
- :package-version '(nix-mode . " 1.6.0" ))
25
+ " Do not list the current entry itself within sections of `nix-store-path-mode' ."
26
+ :package-version '(nix-mode . " 1.6.0" )
27
+ :type 'boolean )
27
28
28
29
(defun nix-store-realise (path )
29
30
" Realise a path asynchronously.
You can’t perform that action at this time.
0 commit comments