[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 ed4cd3eddf7: dockerfile-ts-mode: Prevent empty categories in im
From: |
Eli Zaretskii |
Subject: |
emacs-29 ed4cd3eddf7: dockerfile-ts-mode: Prevent empty categories in imenu (Bug#63759) |
Date: |
Wed, 31 May 2023 09:17:48 -0400 (EDT) |
branch: emacs-29
commit ed4cd3eddf7763a70630df8fd238592e6f3b881c
Author: Randy Taylor <dev@rjt.dev>
Commit: Eli Zaretskii <eliz@gnu.org>
dockerfile-ts-mode: Prevent empty categories in imenu (Bug#63759)
* lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode--imenu):
Don't include empty categories.
---
lisp/progmodes/dockerfile-ts-mode.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/dockerfile-ts-mode.el
b/lisp/progmodes/dockerfile-ts-mode.el
index f2f30cf2617..2973b5149db 100644
--- a/lisp/progmodes/dockerfile-ts-mode.el
+++ b/lisp/progmodes/dockerfile-ts-mode.el
@@ -123,8 +123,9 @@ continuation to the previous entry."
(let* ((node (treesit-buffer-root-node))
(stage-tree (treesit-induce-sparse-tree
node "from_instruction"
- nil 1000)))
- `(("Stage" . ,(dockerfile-ts-mode--imenu-1 stage-tree)))))
+ nil 1000))
+ (stage-index (dockerfile-ts-mode--imenu-1 stage-tree)))
+ (when stage-index `(("Stage" . ,stage-index)))))
(defun dockerfile-ts-mode--imenu-1 (node)
"Helper for `dockerfile-ts-mode--imenu'.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 ed4cd3eddf7: dockerfile-ts-mode: Prevent empty categories in imenu (Bug#63759),
Eli Zaretskii <=