[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/inspector 5b808173cc 52/93: Slice with [more] button
From: |
ELPA Syncer |
Subject: |
[elpa] externals/inspector 5b808173cc 52/93: Slice with [more] button |
Date: |
Tue, 24 May 2022 18:57:59 -0400 (EDT) |
branch: externals/inspector
commit 5b808173cc76e208ce22e92e9245a5a22216b55f
Author: Mariano Montone <marianomontone@gmail.com>
Commit: Mariano Montone <marianomontone@gmail.com>
Slice with [more] button
---
inspector.el | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/inspector.el b/inspector.el
index 37e32d7d68..ac65e192d7 100644
--- a/inspector.el
+++ b/inspector.el
@@ -172,6 +172,22 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(when slice
(funcall function slice (lambda () (inspector--do-with-slicer slicer
function))))))
+(defun inspector--do-with-slicer-and-more-button (slicer function)
+ (inspector--do-with-slicer
+ slicer
+ (lambda (slice cont)
+ (funcall function slice cont)
+ (insert-button "[More]"
+ 'action (let ((pos (point)))
+ (lambda (btn)
+ (ignore btn)
+ (setq buffer-read-only nil)
+ (goto-char pos)
+ (delete-char (length "[More]"))
+ (funcall cont)
+ (setq buffer-read-only nil)))
+ 'follow-link t))))
+
(cl-defgeneric inspect-object (object)
"Main generic interface for filling inspector buffers for the different
types of OBJECT.")
@@ -294,7 +310,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(inspector--insert-title "Proper list")
(let ((i 0)
(j 0))
- (inspector--do-with-slicer
+ (inspector--do-with-slicer-and-more-button
(lambda ()
(when (< i (length cons))
(subseq cons i (min (incf i inspector-slice-size)
@@ -304,18 +320,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(insert (format "%d: " j))
(incf j)
(inspector--insert-inspect-button elem)
- (newline))
- (insert-button "[More]"
- 'action (let ((pos (point)))
- (lambda (btn)
- (ignore btn)
- (setq buffer-read-only nil)
- (goto-char pos)
- (delete-char (length "[More]"))
- (funcall cont)
- (setq buffer-read-only nil)
- ))
- 'follow-link t)))))
+ (newline))))))
(t ;; It is a cons cell
(inspector--insert-title "Cons cell")
(insert "CAR: ")
- [elpa] externals/inspector 0dc8dd946b 77/93: Render built-in functions, (continued)
- [elpa] externals/inspector 0dc8dd946b 77/93: Render built-in functions, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector ee6d2ea01b 80/93: More tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector d60552c6d2 76/93: Some more tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector ce05c412ba 81/93: More tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 40b9031bd8 84/93: Delete .github, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector e1395930a6 86/93: Proper faces for inspector buttons, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 0c92102cfd 87/93: Inherit from fundamental-mode, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 9abd8f6890 91/93: Fix, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector f8affefb73 35/93: Major mode for inspector, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 49c8c75ada 44/93: Fixes to Emacs debug backtrace inspection, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 5b808173cc 52/93: Slice with [more] button,
ELPA Syncer <=
- [elpa] externals/inspector bc118aa31a 65/93: Show length of lists, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 094cd26780 78/93: More tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 902ffcfdfc 79/93: .gitignore, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector e9b4f2e276 85/93: tests: adjustment, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 8a3d1b8627 88/93: Display some more buffer properties, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 20260fc077 15/93: Clean inspector history on exit, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 3e2e8d3476 31/93: Faces, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector b3833deecb 33/93: Better symbol inspector, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 0fa89e3177 41/93: Make customization group for faces, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 143668d367 01/93: First commit, ELPA Syncer, 2022/05/24