[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 3ed3b7b 257/346: Simplify imenu testing code
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 3ed3b7b 257/346: Simplify imenu testing code |
Date: |
Sun, 29 Aug 2021 11:00:41 -0400 (EDT) |
branch: elpa/d-mode
commit 3ed3b7b1c43e07b2071746b6a723cc1e9811a0b1
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
Simplify imenu testing code
---
d-mode-test.el | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/d-mode-test.el b/d-mode-test.el
index e53c4b6..4f37730 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -234,21 +234,18 @@ Called from the #run snippet of individual test files."
(require 'imenu)
-(defun d-test-imenu-to-lines (l)
- (apply #'append
- (mapcar
- (lambda (e)
- (if (imenu--subalist-p e)
- (d-test-imenu-to-lines (cdr e))
- (list (line-number-at-pos (cdr e)))))
- l)))
+(defun d-test--imenu-to-lines (x)
+ "Extracts line numbers from one possibly-nested imenu--index-alist element
X."
+ (if (imenu--subalist-p x)
+ (apply #'append (mapcar #'d-test--imenu-to-lines (cdr x)))
+ (list (line-number-at-pos (cdr x)))))
(defun d-test-get-imenu-lines ()
"Get list of line numbers of lines recognized as imenu entries.
Called from the #run snippet of individual test files."
(imenu--make-index-alist t)
- (sort (d-test-imenu-to-lines imenu--index-alist) '<))
+ (sort (d-test--imenu-to-lines (cons nil imenu--index-alist)) '<))
(defun d-test-save-result (filename)
"In case of an unexpected result, save it to a file.
- [nongnu] elpa/d-mode 3f669a1 231/346: Replace regex-based imenu implementation with cc-mode-based, (continued)
- [nongnu] elpa/d-mode 3f669a1 231/346: Replace regex-based imenu implementation with cc-mode-based, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode db2c33f 225/346: Fix parsing of D lambda literals' parameter lists, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 1598b12 248/346: Switch to GPL v3 (or later), ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 24fffad 242/346: Fix parsing of declarations after "static else", ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a8aad35 241/346: Fix imenu false positive with "static if", ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 6a19457 244/346: Fix function calls being mis-parsed as declarations after static else, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 3077252 238/346: Correctness fix in d-forward-type, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 1e5c7c3 227/346: Fix parsing of declarations following protection group, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode f8c37b9 260/346: Implement parsing module names in import and module declarations, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 3c7db4a 255/346: Fix imenu context with multiple nesting, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 3ed3b7b 257/346: Simplify imenu testing code,
ELPA Syncer <=
- [nongnu] elpa/d-mode f1d37dd 263/346: Fix byte-compiled version, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 060d1f3 249/346: Fix parsing of version(...) and other non-scope blocks, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2529eb2 259/346: Add a TODO, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8d30f6b 246/346: Add back the old imenu implementation for Emacs 25, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 7d39bdf 269/346: Add missing "package" keyword to c-modifier-kwds, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode ed4428c 272/346: Fix fontification of "invariant", ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 300708d 268/346: Fix imenu for template members, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 685a8cc 271/346: Expand "is" rule for other infix keyword variants and negation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 4dd90f3 277/346: Consolidate c-forward-decl-or-cast-1 "else" patch, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 6417bf5 279/346: d-mode-test: Stop catching exceptions, ELPA Syncer, 2021/08/29