[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/javaimp df6ad62: * javaimp.el (javaimp-help-show-scopes
From: |
Filipp Gunbin |
Subject: |
[elpa] externals/javaimp df6ad62: * javaimp.el (javaimp-help-show-scopes): Add show-all arg |
Date: |
Fri, 19 Nov 2021 12:06:22 -0500 (EST) |
branch: externals/javaimp
commit df6ad62197bc863227c7c74ba6817312de9ba681
Author: Filipp Gunbin <fgunbin@fastmail.fm>
Commit: Filipp Gunbin <fgunbin@fastmail.fm>
* javaimp.el (javaimp-help-show-scopes): Add show-all arg
---
javaimp.el | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/javaimp.el b/javaimp.el
index 328a5ae..5a934a7 100644
--- a/javaimp.el
+++ b/javaimp.el
@@ -750,13 +750,22 @@ start (`javaimp-scope-start') instead."
(javaimp-scope-start scope)
(javaimp-scope-open-brace scope)))))))
-(defun javaimp-help-show-scopes ()
- "Show scopes in a *javaimp-scopes* buffer."
- (interactive)
- (let ((scopes (save-excursion
- (save-restriction
- (widen)
- (javaimp--parse-get-all-scopes))))
+(defun javaimp-help-show-scopes (&optional show-all)
+ "Show scopes in a *javaimp-scopes* buffer, with clickable
+entries. By default, the scopes are only those which appear in
+Imenu (`javaimp-imenu-create-index' is responsible for that), but
+with prefix arg, show all scopes."
+ (interactive "P")
+ (let ((scopes
+ (save-excursion
+ (save-restriction
+ (widen)
+ (javaimp--parse-get-all-scopes
+ (unless show-all
+ (lambda (scope)
+ (javaimp-test-scope-type scope
+ '(class interface enum method)
+ javaimp--classlike-scope-types)))))))
(file buffer-file-name)
(buf (get-buffer-create "*javaimp-scopes*")))
(with-current-buffer buf
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/javaimp df6ad62: * javaimp.el (javaimp-help-show-scopes): Add show-all arg,
Filipp Gunbin <=