@@ -124,11 +124,10 @@ respectively. The LABEL is the text displayed."
124
124
(magit-insert-heading , label )
125
125
(cl-loop for x in value
126
126
for exists = (file-exists-p x)
127
+ for face = (if exists 'nix-store-path-realised-face 'nix-store-path-unrealised-face )
127
128
do
128
129
(magit-insert-section (store-path x)
129
- (insert
130
- (propertize x 'face (if exists 'nix-store-path-realised-face 'nix-store-path-unrealised-face ))
131
- ?\n )))
130
+ (insert (propertize x 'face face) ?\n )))
132
131
(insert ?\n )
133
132
(magit-insert-child-count (magit-current-section))))))
134
133
@@ -161,6 +160,7 @@ respectively. The LABEL is the text displayed."
161
160
A list of function that each take one argument, the store path object."
162
161
:group 'nix-store
163
162
:type 'hook
163
+ :package-version '(nix-mode . " 1.5.0" )
164
164
:options '(nix-store-path-insert-path
165
165
nix-store-path-insert-status
166
166
nix-store-path-insert-hash
@@ -175,7 +175,8 @@ A list of function that each take one argument, the store path object."
175
175
" Hook run to insert sections into a nix-store buffer.
176
176
A list of function that each take one argument, the store path object."
177
177
:group 'nix-store
178
- :type 'hook )
178
+ :type 'hook
179
+ :package-version '(nix-mode . " 1.5.0" ))
179
180
180
181
(defun nix-store-show-path (path )
181
182
" Show a nix-store PATH.
@@ -214,10 +215,9 @@ It uses \\[nix-store-show-path] to display the store path."
214
215
(defun nix-store-show-log ()
215
216
" Opens the log file for the derivation of the nix-store path."
216
217
(interactive )
217
- (let ((drv-path (car (nix-store-path-derivers nix-buffer-store-path))))
218
- (if (not drv-path)
219
- (message " This store path has no associated derivation. " )
220
- (find-file (nix-log-path drv-path)))))
218
+ (if-let ((drv-path (car (nix-store-path-derivers nix-buffer-store-path))))
219
+ (find-file (nix-log-path drv-path))
220
+ (user-error " This store path has no associated derivation." )))
221
221
222
222
(defvar nix-store-path-mode-map
223
223
(let ((map (make-sparse-keymap )))
@@ -230,6 +230,7 @@ It uses \\[nix-store-show-path] to display the store path."
230
230
(nix-store-show-path (nix-store-path-path nix-buffer-store-path)))
231
231
232
232
(define-derived-mode nix-store-path-mode magit-section-mode " Nix Store Path"
233
+ :group 'nix-store
233
234
(setq-local revert-buffer-function #'nix-store--revert-buffer-function )
234
235
(read-only-mode 1 ))
235
236
0 commit comments