      (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.

        term-prompt-regexp "^[^❯]+❯ *"
        term-line-mode-buffer-read-only t)

  ;; Clean mode-line:
  ;; (setq mode-line-format
  ;;       '("" mode-line-front-space
  ;;         (:eval (pjones:mode-line-status))
  ;;         "   " mode-line-buffer-identification
  ;;         "     [term" mode-line-process "]"))

  ;; Keep things Emacs-like:
  (term-set-escape-char ?\C-x)
  (toggle-truncate-lines -1)

  (let ((map term-raw-escape-map))
    (define-key map (kbd "C-c") nil)
    (define-key map (kbd "C-j") nil)
    (define-key map (kbd "C-k") nil)
    (define-key map (kbd "C-q") nil)
    (define-key map (kbd "C-x") nil))

  (let ((map term-mode-map))
    (define-key map (kbd "C-c") nil)
    (define-key map (kbd "C-c C-k") 'pjones:term-char-mode)
    (define-key map (kbd "RET")     'pjones:term-char-mode))

  (let ((map term-raw-map))
    ;; Fix the F-keys:
    (dolist (key pjones:term-function-keys)
      (define-key map
        (read-kbd-macro (format "<%s>" (car key)))
        #'pjones:term-send-function-key))

    ;; Sending special keys to the terminal:
    (define-key map (kbd "C-c")     nil)
    (define-key map (kbd "C-c C-c") (pjones:term-send-char [?\C-c]))

    (kill-buffer buffer)))

;; FIXME: this doesn't really work. Write a new version based off the
;; same idea in EXWM.  Also, this isn't working with Evil (or maybe
;; it's default Emacs).  I'm getting an error about the terminal being
;; read only.
(defun pjones:term-quoted-insert (count)
  "Read next input character and send it directly to the terminal.

