summaryrefslogtreecommitdiff
path: root/.emacs
blob: 63df819533b4144668961b131feb7b93c0b3b1a8 (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
(add-to-list 'load-path "~/.emacs.d")

;; el-get
(load "el-get-init")

;; evil
(require 'evil)
(load "evil-settings")
(evil-mode 1)

;; wrap long lines
(setq truncate-partial-width-windows nil)

;; show parens
(show-paren-mode 1)

;; line numbering
(global-linum-mode 1)
(setq linum-format "%4d ")

;; scrollbar on the right
(set-scroll-bar-mode 'right)

;; theming
(require 'color-theme)
(color-theme-initialize)
(color-theme-charcoal-black)

;; set default font
;; this is needed since Emacs-24 to also set all future frames
;; (setting 'default' in custom-set-faces seems not to work anymore)
(add-to-list 'default-frame-alist '(font . "Inconsolata-11"))

;; use Poly/ML as SML interpreter
(setq sml-program-name "poly")

;; work around bugs in Isabelle/PG
;; we need to toggle options twice to make them work
(defun isabelle-repair (what part)
  (let*
    ((msg (format "Repairing %s" (capitalize what)))
     ; create the variable from `what` and `part`
     ; replace spaces by "-" in `what`
     (var (format "isar-%s:%s" part
                  (mapconcat 'identity (split-string (downcase what)) "-")))
     (vart (concat var "-toggle"))
     (repair `(lambda ()
                ; intern-soft also handles the case, that `var` is not existing
                ; (it returns nil then -- making `when` skip)
                (when (intern-soft ,var)
                  (message ,msg)
                  (funcall (intern ,vart) 0) ; toggle off
                  (funcall (intern ,vart) 1) ; toggle on
                ))))
    
    (add-hook 'proof-shell-init-hook repair)))

(isabelle-repair "auto solve direct" "tracing")
(isabelle-repair "auto quickcheck" "tracing")

;; custom file
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file)