(add-to-list 'load-path "~/.emacs.d") ;; el-get (load "el-get-init") ;; evil ;(require 'evil) ;(load "evil-settings") ;(evil-mode 1) ;; clipboard options (setq mouse-drag-copy-region nil) ; stops selection with a mouse being immediately injected to the kill ring (setq x-select-enable-primary nil) ; stops killing/yanking interacting with primary X11 selection (setq x-select-enable-clipboard t) ; makes killing/yanking interact with clipboard X11 selection ;; 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) ;; maximize frame (defun toggle-fullscreen (&optional other_mode) "toggles whether the currently selected frame is maximized or reset to prior size" (interactive) (let ((f (selected-frame))) (modify-frame-parameters f `((fullscreen . ,(if (frame-parameter f 'fullscreen) other_mode 'maximized)))))) (defun force-fullscreen () "maximizes the currently selected frame" (interactive) (toggle-fullscreen 'maximized)) (add-hook 'emacs-startup-hook (lambda () (run-with-idle-timer 0.1 nil 'force-fullscreen))) ;; 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") (isabelle-repair "quick and dirty" "proof") ;; toggle three window mode (defun toggle-three-panes () (interactive) (proof-multiple-frames-toggle) (proof-three-window-toggle)) (defun isar-mode-keys () (message "Loading isar keys") (local-set-key (kbd "C-c 3") 'toggle-three-panes) ) (add-hook 'isar-mode-hook 'isar-mode-keys) ;; load fci (require 'column-enforce-mode) (add-hook 'isar-mode-hook '80-column-mode) ;; custom file (setq custom-file "~/.emacs.d/custom.el") (load custom-file)