summaryrefslogtreecommitdiff
path: root/lisp/filesets.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2023-12-16 13:25:58 +0200
committerEli Zaretskii <eliz@gnu.org>2023-12-16 13:25:58 +0200
commit5be94e2bce53f9826b64d3566a0d5524aeccbccd (patch)
tree91d7f178b8e4ff0bff08bfe622742896d4fd14ba /lisp/filesets.el
parent6b6e770a1f55da0580706c7ec21a409437d19ab4 (diff)
downloademacs-5be94e2bce53f9826b64d3566a0d5524aeccbccd.tar.gz
emacs-5be94e2bce53f9826b64d3566a0d5524aeccbccd.tar.bz2
emacs-5be94e2bce53f9826b64d3566a0d5524aeccbccd.zip
Fix opening directory trees from Filesets menu
In bug#976, the code was fixed, but the cautious condition in the original author's code, which catered to invoking 'filelists-open' from the menu-bar menu, was omitted, which made that invocation, which did work before, broken. * lisp/filesets.el (filesets-get-filelist): Fix opening directory trees from the Filesets menu-bar menu. (Bug#67658)
Diffstat (limited to 'lisp/filesets.el')
-rw-r--r--lisp/filesets.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/filesets.el b/lisp/filesets.el
index 1b7e6ffa81f..d00a29c2ebf 100644
--- a/lisp/filesets.el
+++ b/lisp/filesets.el
@@ -1653,7 +1653,17 @@ Assume MODE (see `filesets-entry-mode'), if provided."
(filesets-entry-get-master entry)))))
(cons entry (filesets-ingroup-cache-get entry))))
(:tree
- (let* ((dirpatt (filesets-entry-get-tree entry))
+ ;; Warning: ENTRY here could be of at least two
+ ;; differente forms, either
+ ;; (NAME (:tree DIRECTORY PATTERN))
+ ;; or
+ ;; (DIRECTORY PATTERN)
+ ;; The latter happens when opening a tree fileset
+ ;; from the Filesets menu. We need to support both
+ ;; of these forms!
+ (let* ((dirpatt (if (consp (nth 1 entry))
+ (filesets-entry-get-tree entry)
+ entry))
(dir (nth 0 dirpatt))
(patt (nth 1 dirpatt))
(depth (or (filesets-entry-get-tree-max-level entry)