Fix colview-related failing tests

* lisp/org-compat.el (org-line-number-display-width): New function.
* lisp/org-colview.el (org-columns--display-here-title): Use new
  function.
This commit is contained in:
Nicolas Goaziou 2018-04-28 02:17:44 +02:00
parent 031f362352
commit eab65c9cf8
2 changed files with 8 additions and 1 deletions

View File

@ -448,7 +448,7 @@ for the duration of the command.")
"Overlay the newline before the current line with the table title." "Overlay the newline before the current line with the table title."
(interactive) (interactive)
(let ((title "") (let ((title "")
(linum-offset (line-number-display-width 'columns)) (linum-offset (org-line-number-display-width 'columns))
(i 0)) (i 0))
(dolist (column org-columns-current-fmt-compiled) (dolist (column org-columns-current-fmt-compiled)
(pcase column (pcase column

View File

@ -61,6 +61,13 @@
(defvar org-table-tab-recognizes-table.el) (defvar org-table-tab-recognizes-table.el)
(defvar org-table1-hline-regexp) (defvar org-table1-hline-regexp)
;;; Emacs < 26.1 compatibility
(if (fboundp 'line-number-display-width)
(defalias 'org-line-number-display-width 'line-number-display-width)
(defun org-line-number-display-width (&rest _) 0))
;;; Emacs < 25.1 compatibility ;;; Emacs < 25.1 compatibility