]> git.eshelyaron.com Git - emacs.git/commitdiff
Prevent to use tabulated-list--near-rows unbound
authorTino Calancha <tino.calancha@gmail.com>
Sun, 22 Jan 2017 05:23:45 +0000 (14:23 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Sun, 22 Jan 2017 05:23:45 +0000 (14:23 +0900)
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry):
Make sure 'tabulated-list--near-rows' is bound before use it (Bug#25506).

lisp/emacs-lisp/tabulated-list.el

index eadf79ffd4f9cf0340080202d4be6049522ae8ab..b6b49b1bfa271ca04e67dab3e84690e70b600560 100644 (file)
@@ -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