      (interactive)
      (seq-doseq (char ,chars)
        (term-send-raw-string (make-string 1 char)))))
-
-(defun pjones:term-send-control-c ()
-  "Send ^c to the terminal."
-  (interactive)
-  (term-send-raw-string (make-string 1 ?\C-c)))
 
 (defun pjones:remove-dead-term (&rest args)
   "Clean up after a dead terminal.

(defun pjones:term-char-mode ()
  "Return to raw/character mode."
  (interactive)
  (term-char-mode)
  (let ((proc (get-buffer-process (current-buffer))))
    (goto-char (process-mark proc))))

(defmacro pjones:term-send-char (chars)
  "Create a function to send CHARS to the terminal."

    (define-key map (kbd "C-c C-q") #'pjones:term-quoted-insert)

    ;; Other functions:
    (define-key map (kbd "C-c C-k") #'evil-normal-state)
    (define-key map (kbd "C-c C-r") #'pjones:term-rename)
    (define-key map (kbd "M-x")     nil)))

(advice-add 'term-handle-exit :after 'pjones:remove-dead-term)
