emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ade0652: Prevent to use tabulated-list--near-rows u


From: Tino Calancha
Subject: [Emacs-diffs] master ade0652: Prevent to use tabulated-list--near-rows unbound
Date: Sun, 22 Jan 2017 05:29:46 +0000 (UTC)

branch: master
commit ade0652cc2a7103cd910accda8165ff8ee7c719f
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    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).
---
 lisp/emacs-lisp/tabulated-list.el |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/tabulated-list.el 
b/lisp/emacs-lisp/tabulated-list.el
index eadf79f..b6b49b1 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]