diff options
author | Tino Calancha <tino.calancha@gmail.com> | 2017-01-22 14:23:45 +0900 |
---|---|---|
committer | Tino Calancha <tino.calancha@gmail.com> | 2017-01-22 14:23:45 +0900 |
commit | ade0652cc2a7103cd910accda8165ff8ee7c719f (patch) | |
tree | 2b844a063520482bdf8434baa130b220fd0af32e /lisp/emacs-lisp/tabulated-list.el | |
parent | ad29e145b16cf2966e3a9df884cbc234f1ae3e51 (diff) | |
download | emacs-ade0652cc2a7103cd910accda8165ff8ee7c719f.tar.gz |
Prevent to use tabulated-list--near-rows unbound
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry):
Make sure 'tabulated-list--near-rows' is bound before use it (Bug#25506).
Diffstat (limited to 'lisp/emacs-lisp/tabulated-list.el')
-rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index eadf79ffd4f..b6b49b1bfa2 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -412,8 +412,13 @@ of column descriptors." (inhibit-read-only t)) (if (> tabulated-list-padding 0) (insert (make-string x ?\s))) - (dotimes (n ncols) - (setq x (tabulated-list-print-col n (aref cols n) x))) + (let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506). + (or (bound-and-true-p tabulated-list--near-rows) + (list (or (tabulated-list-get-entry (point-at-bol 0)) + cols) + cols)))) + (dotimes (n ncols) + (setq x (tabulated-list-print-col n (aref cols n) x)))) (insert ?\n) ;; Ever so slightly faster than calling `put-text-property' twice. (add-text-properties |