General, minor refactor & reformatting

This commit is contained in:
Henrik Lissner 2020-03-27 01:25:30 -04:00
parent 2ecd100c38
commit 169f9a6121
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
22 changed files with 161 additions and 177 deletions

View file

@ -41,15 +41,17 @@
;; after eob. On Emacs 27 this no longer happens.
(unless EMACS27+
(defun +doom--line-range-fn ()
(cons (line-beginning-position)
(cond ((let ((eol (line-end-position)))
(and (= eol (point-max))
(/= eol (line-beginning-position))))
(1- (line-end-position)))
((or (eobp)
(= (line-end-position 2) (point-max)))
(line-end-position))
((line-beginning-position 2)))))
(let ((bol (line-beginning-position))
(eol (line-end-position))
(pmax (point-max)))
(cons bol
(cond ((and (= eol pmax)
(/= eol bol))
(1- eol))
((or (eobp)
(= eol pmax))
eol)
((line-beginning-position 2))))))
(setq hl-line-range-function #'+doom--line-range-fn))
;; Because fringes can't be given a buffer-local face, they can look odd, so