Skip to content

Instantly share code, notes, and snippets.

View eskil's full-sized avatar

Eskil Heyn Olsen eskil

View GitHub Profile
(define-minor-mode code-wrap-mode
"Visually wrap the buffer text to the previous lines indent, plus a tab."
:lighter ""
(if code-wrap-mode
(progn
(visual-line-mode 1)
(jit-lock-register #'indent-prefix-wrap-function))
(visual-line-mode 0)
(jit-lock-unregister #'indent-prefix-wrap-function)
(with-silent-modifications