   '("IPAGothic" . "unicode-bmp"))
 
 ; Custom functions {{{
-(defun my-add-comment (&optional b e)
+(defun my-addrem-comment-region (b e f)
   "Use the `dc' command to comment the current region."
-  (interactive "r") ; "r" tells Emacs to pass the region (point and mark) in as the first two arguments to the command
+  (interactive)
   (shell-command-on-region
    ; beginning and end of buffer
    b e
    ; command and parameters
-   "~/prog/dc/src/dc -l shell"
+   (concat
+     (if f
+         "~/prog/dc/src/dc -l "
+         "~/prog/dc/src/dc -u -l ")
+     (cond
+       ((boundp 'c-mode) "c")
+       ((boundp 'haskell-mode) "haskell")
+       (t "shell")) ; default to shell
+     )
    ; output buffer
    (current-buffer)
    ; replace?

    (define-key evil-insert-state-map "k" #'cofi/maybe-exit))
  )

(define-key evil-visual-state-map ",c" 'my-comment-and-escape) ; add comment
(define-key evil-visual-state-map ",C" 'my-uncomment-and-escape) ; add comment
(define-key evil-normal-state-map ",c" 'my-comment-this-line) ; add comment
(define-key evil-normal-state-map ",C" 'my-uncomment-this-line) ; add comment
;}}}

; Elscreen {{{

   t
   )
  )
(defun my-addrem-comment (f)
  (if (use-region-p)
    (progn
      (my-addrem-comment-region (region-beginning) (region-end) f)
      (evil-visual-char)
      (evil-exit-visual-state)
      )
    (my-addrem-comment-region (line-beginning-position) (line-beginning-position 2) f)
  ))
(setq my-current-font 0)
(defun my-toggle-font ()
	"Toggle font between Terminus and DejaVu Sans Mono"
