diff --git a/lisp/mpc.el b/lisp/mpc.el index ad11007f064..ca450fd959a 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -312,11 +312,11 @@ mpc--proc-alist-to-alists-starters (defun mpc--proc-alist-to-alists (alist) (cl-assert (or (null alist) (memq (caar alist) mpc--proc-alist-to-alists-starters))) - (let ((starter (caar alist)) + (let (;; (starter (caar alist)) (alists ()) tmp) (dolist (pair alist) - (when (eq (car pair) starter) + (when (memq (car pair) mpc--proc-alist-to-alists-starters) (if tmp (push (nreverse tmp) alists)) (setq tmp ())) (push pair tmp)) @@ -638,15 +638,14 @@ mpc-cmd-find (mpc-proc-buf-to-alists (mpc-proc-cmd (list "search" "any" value)))) ((eq tag 'Directory) - (let ((pairs - (mpc-proc-buf-to-alist + (let ((entries + (mpc-proc-buf-to-alists (mpc-proc-cmd (list "listallinfo" value))))) - (mpc--proc-alist-to-alists - ;; Strip away the `directory' entries. - (delq nil (mapcar (lambda (pair) - (if (eq (car pair) 'directory) - nil pair)) - pairs))))) + ;; Strip away the `directory' entries. + (delq nil (mapcar (lambda (entry) + (if (eq (caar entry) 'directory) + nil entry)) + entries)))) ((string-match "|" (symbol-name tag)) (add-to-list 'mpc--find-memoize-union-tags tag) (let ((tag1 (intern (substring (symbol-name tag)