branch: externals/inspector
commit de74d253a77bcffac251a5868fe42244362e7e17
Author: Mariano Montone <[email protected]>
Commit: Mariano Montone <[email protected]>

    Patch for Emacs 30 for print ellipses
    
    See: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64536#13
    See: Github issue #27
---
 inspector.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/inspector.el b/inspector.el
index fa9b1cc778..7891080b83 100644
--- a/inspector.el
+++ b/inspector.el
@@ -243,13 +243,14 @@ LIMIT controls the truncation."
     (put-text-property (point-min) (point) 'inspector-form (gensym))
     ;; Make buttons from all the "..."s.  Since there might be many of
     ;; them, use text property buttons.
-    (goto-char (point-min))
-    (while (< (point) (point-max))
-      (let ((end (next-single-property-change (point) 'cl-print-ellipsis
-                                              nil (point-max))))
-        (when (get-text-property (point) 'cl-print-ellipsis)
-          (make-text-button (point) end :type 'backtrace-ellipsis))
-        (goto-char end)))
+    (unless (boundp 'cl-print-expand-ellipsis-function) ;Emacs-30
+      (goto-char (point-min))
+      (while (< (point) (point-max))
+        (let ((end (next-single-property-change (point) 'cl-print-ellipsis
+                                                nil (point-max))))
+          (when (get-text-property (point) 'cl-print-ellipsis)
+            (make-text-button (point) end :type 'backtrace-ellipsis))
+          (goto-char end))))
     (buffer-string)))
 
 (cl-defgeneric inspector--face-for-object (object)

Reply via email to