Last active
August 29, 2015 14:05
-
-
Save evincarofautumn/0f4ad718747ee259d535 to your computer and use it in GitHub Desktop.
Hack to make “adaptive-wrap-prefix-mode” work with tabs and show a fill indicator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun adaptive-wrap-fill-context-prefix (begin end) | |
"Like `fill-context-prefix', but with length adjusted by `adaptive-wrap-extra-indent'." | |
;; Note: fill-context-prefix may return nil; See: | |
;; http://article.gmane.org/gmane.emacs.devel/156285 | |
(let* ((fcp (or (fill-context-prefix begin end) "")) | |
(fcp-len (string-width fcp))) | |
(if (>= adaptive-wrap-extra-indent 0) | |
(concat (make-string fcp-len ?\ ) | |
"│" | |
(make-string adaptive-wrap-extra-indent ?\ )) | |
""))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment