Skip to content

Commit

Permalink
Use display-line-numbers for Emacs 26.1 and later
Browse files Browse the repository at this point in the history
PR for #1317 -- use display-line-numbers mode, which is implemented at the C level for speed benefits, if available.
  • Loading branch information
legendre6891 authored and bbatsov committed Feb 13, 2021
1 parent 5e03876 commit beba135
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### New features

* Enable `nlinum-mode` by default. Can be disabled by setting `prelude-minimalistic-ui` to `t`.
* Enable `nlinum-mode` or `display-line-numbers-mode` by default. Can be disabled by setting `prelude-minimalistic-ui` to `t`.
* Enable site-wide installation for Prelude.
* Auto-installs `julia-mode` if needed.
* Auto-install `adoc-mode` for AsciiDoc files.
Expand Down
7 changes: 5 additions & 2 deletions core/prelude-ui.el
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@
;; show line numbers at the beginning of each line
(unless prelude-minimalistic-ui
;; there's a built-in linum-mode, but we're using
;; nlinum-mode, as it's supposedly faster
(global-nlinum-mode t))
;; display-line-numbers-mode or nlinum-mode,
;; as it's supposedly faster
(if (fboundp 'global-display-line-numbers-mode)
(global-display-line-numbers-mode)
(global-nlinum-mode t)))

;; enable y/n answers
(fset 'yes-or-no-p 'y-or-n-p)
Expand Down

0 comments on commit beba135

Please sign in to comment.