Skip to content

Instantly share code, notes, and snippets.

@larstvei
Last active August 29, 2015 14:17
Show Gist options
  • Save larstvei/87b22050e324d9fb7e3c to your computer and use it in GitHub Desktop.
Save larstvei/87b22050e324d9fb7e3c to your computer and use it in GitHub Desktop.
(defun clear-comint ()
"Runs `comint-truncate-buffer' with the
`comint-buffer-maximum-size' set to zero."
(interactive)
(let ((comint-buffer-maximum-size 0))
(comint-truncate-buffer)))
(add-hook 'comint-mode-hook (lambda () (local-set-key (kbd "C-l") 'clear-comint)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment