Polyfill line-number-display-width for Emacs 25
Fixes void-function line-number-display-width errors (used in company-pseudo-tooltip-frontend).
This commit is contained in:
parent
6515a1c539
commit
77838534ce
1 changed files with 7 additions and 0 deletions
|
@ -50,6 +50,13 @@ When `display-line-numbers-mode' is turned on,
|
|||
to display all line numbers in the buffer."
|
||||
:type 'boolean)
|
||||
|
||||
;;;###autoload
|
||||
(defun line-number-display-width ()
|
||||
"Return the width used for displaying line numbers in the
|
||||
selected window."
|
||||
(length (save-excursion (goto-char (point-max))
|
||||
(format-mode-line "%l"))))
|
||||
|
||||
(defun display-line-numbers-update-width ()
|
||||
"Prevent the line number width from shrinking."
|
||||
(let ((width (line-number-display-width)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue