[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/slime 0c6bc6bd26 33/43: Inspector: differentiate inactive
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/slime 0c6bc6bd26 33/43: Inspector: differentiate inactive array elements |
Date: |
Thu, 28 Dec 2023 22:00:30 -0500 (EST) |
branch: elpa/slime
commit 0c6bc6bd26bdb4921faf7fec08cd9db4bbe29438
Author: MichaĆ "phoe" Herda <phoe@disroot.org>
Commit: Stas Boukarev <stassats@gmail.com>
Inspector: differentiate inactive array elements
---
swank.lisp | 44 ++++++++++++++++++++++++++++++++++++++------
1 file changed, 38 insertions(+), 6 deletions(-)
diff --git a/swank.lisp b/swank.lisp
index ff23ea0afb..f2f14c6e66 100644
--- a/swank.lisp
+++ b/swank.lisp
@@ -3405,12 +3405,44 @@ Return NIL if LIST is circular."
(iline "Adjustable" (adjustable-array-p array))
(iline "Fill pointer" (if (array-has-fill-pointer-p array)
(fill-pointer array)))
- "Contents:" '(:newline)
- (labels ((k (i max)
- (cond ((= i max) '())
- (t (lcons (iline i (row-major-aref array i))
- (k (1+ i) max))))))
- (k 0 (array-total-size array)))))
+ (if (array-has-fill-pointer-p array)
+ (emacs-inspect-vector-with-fill-pointer-aux array)
+ (emacs-inspect-array-aux array))))
+
+(defun emacs-inspect-array-aux (array)
+ (unless (= 0 (array-total-size array))
+ (lcons*
+ "Contents:" '(:newline)
+ (labels ((k (i max)
+ (cond ((= i max) '())
+ (t (lcons (iline i (row-major-aref array i))
+ (k (1+ i) max))))))
+ (k 0 (array-total-size array))))))
+
+(defun emacs-inspect-vector-with-fill-pointer-aux (array)
+ (let ((active-elements? (< 0 (fill-pointer array)))
+ (inactive-elements? (< (fill-pointer array)
+ (array-total-size array))))
+ (labels ((k (i max cont)
+ (cond ((= i max) (funcall cont))
+ (t (lcons (iline i (row-major-aref array i))
+ (k (1+ i) max cont)))))
+ (collect-active ()
+ (if active-elements?
+ (lcons*
+ "Active elements:" '(:newline)
+ (k 0 (fill-pointer array)
+ (lambda () (collect-inactive))))
+ (collect-inactive)))
+ (collect-inactive ()
+ (if inactive-elements?
+ (lcons*
+ "Inactive elements:" '(:newline)
+ (k (fill-pointer array)
+ (array-total-size array)
+ (constantly '())))
+ '())))
+ (collect-active))))
;;;;; Chars
- [nongnu] elpa/slime d925e3ddb7 37/43: slime-cl-indent: indent DEFINE-COMPILER-MACRO the same way as DEFUN, (continued)
- [nongnu] elpa/slime d925e3ddb7 37/43: slime-cl-indent: indent DEFINE-COMPILER-MACRO the same way as DEFUN, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 829310b84f 35/43: Use normal let* instead of deprecated lexical-let*, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime ba29269074 36/43: Simplify message timestamp formatting, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 33d9f46a48 06/43: abcl: Fix openjdk16+ inspection of Java objects fields, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 321ec0c032 02/43: Don't allow duplicate entries in the source file cache., ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 805c29672c 25/43: clasp: Replace TMP host with EXT:TEMPORARY-DIRECTORY when available, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 8bdcc23f9b 10/43: abcl: implement frame-catch-tags, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 771ac73104 34/43: Convert slime-asdf.el to lexical binding, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 180dea856b 07/43: read-source-form: add :sb-xc to *features* on SBCL., ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime ac69b31b1c 32/43: tests: increase timeouts., ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 0c6bc6bd26 33/43: Inspector: differentiate inactive array elements,
ELPA Syncer <=
- [nongnu] elpa/slime a02742211e 41/43: Fix apropos-mode., ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 28adf1dca0 43/43: Merge commit 'a4f3471487db48f7289dc0ea019611d093e5ee7f' into elpa--merge/slime, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 3b9713f207 05/43: swank.asd: Do not reload SWANK., ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 65b781d9c7 19/43: swank-arglists: Silence the SBCL inlining warning., ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 8da60ff543 08/43: abcl: fix warning about ignored slot, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 2080537746 04/43: Require `xref` as regular dependancy, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime a4f3471487 42/43: 2.2.8, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 1ee576a53f 40/43: slime: slime-print-apropos use buttons for dispay, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime 3837255e0c 17/43: sbcl: Use file-write-date instead of debug-source-created, ELPA Syncer, 2023/12/28
- [nongnu] elpa/slime c5342a3086 14/43: Properly comment out multiline error messages during printout, ELPA Syncer, 2023/12/28