Skip to content

Instantly share code, notes, and snippets.

@evincarofautumn
Last active August 29, 2015 14:05
Show Gist options
  • Save evincarofautumn/0f4ad718747ee259d535 to your computer and use it in GitHub Desktop.
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.
(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