Skip to content

Commit 3c374f8

Browse files
committed
Touch files 5 seconds into the future
1 parent 81fec9f commit 3c374f8

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

haskell-commands.el

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,20 @@ Use to update mtime on BUFFER's file."
162162
(format ":!%s %s"
163163
"touch"
164164
(shell-quote-argument (buffer-file-name
165-
(cdr state))))))
165+
(cdr state)))))
166+
;; Set the mtime five seconds into the future, so that ghci
167+
;; will actually reload it.
168+
(haskell-process-send-string
169+
(car state)
170+
(if (eq system-type 'darwin)
171+
(format ":!%s -A 05 %s"
172+
"touch"
173+
(shell-quote-argument (buffer-file-name
174+
(cdr state))))
175+
(format ":!%s -d '+5 seconds' %s"
176+
"touch"
177+
(shell-quote-argument (buffer-file-name
178+
(cdr state)))))))
166179
:complete (lambda (state _)
167180
(with-current-buffer (cdr state)
168181
(clear-visited-file-modtime))))))

0 commit comments

Comments
 (0)