Add display-line-numbers support in Emacs 26 #59

This commit is contained in:
Henrik Lissner 2017-07-12 14:53:27 +02:00
parent e87d278811
commit c0bfaec9d4
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 17 additions and 4 deletions

View file

@ -13,7 +13,9 @@
(defun doom/toggle-line-numbers (&optional arg)
"Toggle `linum-mode'."
(interactive "P")
(cond ((featurep 'nlinum)
(cond ((boundp 'display-line-numbers)
(setq display-line-numbers (not display-line-numbers)))
((featurep 'nlinum)
(nlinum-mode (or arg (if nlinum-mode -1 +1))))
((featurep 'linum)
(linum-mode (or arg (if linum-mode -1 +1))))