-
Notifications
You must be signed in to change notification settings - Fork 1
/
futhark-dev.el
46 lines (32 loc) · 1.31 KB
/
futhark-dev.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
;;; futhark-dev.el --- developer tools for futhark-mode -*- lexical-binding: t; -*-
;; Copyright (C) DIKU 2013-2019, University of Copenhagen
;; This file is not part of GNU Emacs.
;;; License:
;; ICS <https://github.com/diku-dk/futhark-mode/blob/master/LICENSE>
;;; Commentary:
;; This file is not included by futhark-mode.el, but rather contains useful
;; functions for hacking on the mode.
;;; Code:
(require 'cl-lib)
(require 'futhark-mode)
(defun futhark-dev-reload ()
"FOR DEVELOPMENT: Unload and re-require all of futhark-mode.
Also reapply futhark-mode to all futhark-mode buffers."
(interactive)
(let ((futhark-mode-buffers
(cl-remove-if-not (lambda (buf)
(with-current-buffer buf
(eq major-mode 'futhark-mode)))
(buffer-list))))
(ignore-errors (unload-feature 'futhark-mode t))
(ignore-errors (unload-feature 'futhark-highlight t))
(ignore-errors (unload-feature 'futhark-indent t))
(ignore-errors (unload-feature 'futhark-comint t))
(ignore-errors (unload-feature 'futhark-flycheck t))
(require 'futhark-mode)
(mapc (lambda (buf)
(with-current-buffer buf
(futhark-mode)))
futhark-mode-buffers)))
(provide 'futhark-dev)
;;; futhark-dev.el ends here