Update line-number-display-width polyfill

It takes one argument in later versions of Emacs. This file really
shouldn't be visible to Emacs 25.x and earlier, but there has been one
case of it being indexed by Doom's autoload scanner.

Also marks the library with the new DEPRECATED tag. It will be removed
once Doom removes 25.x support.
This commit is contained in:
Henrik Lissner 2019-08-17 15:59:47 -04:00
parent 2cd1c43217
commit 2a3f95f615
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -1,9 +1,9 @@
;;; core/autoload/line-numbers.el -*- lexical-binding: t; -*-
;;;###if (version< emacs-version "26.1")
;; This was lifted out of the display-line-numbers library in Emacs 26.1 and
;; modified to use nlinum for Emacs 25.x users. It should be removed should
;; Emacs 25 support be removed.
;; DEPRECATED This was lifted out of the display-line-numbers library in Emacs
;; 26.1 and modified to use nlinum for Emacs 25.x users. It should be removed
;; should Emacs 25 support be removed.
;;;###autoload
(defvar display-line-numbers t
@ -52,7 +52,7 @@ to display all line numbers in the buffer."
:type 'boolean)
;;;###autoload
(defun line-number-display-width ()
(defun line-number-display-width (&optional _)
"Return the width used for displaying line numbers in the
selected window."
(length (save-excursion (goto-char (point-max))