From b4276f41f434b3a70a98bbf7220654259ba70304 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 16 Apr 2025 03:43:05 -0400 Subject: [PATCH] =?UTF-8?q?fix(eshell):=20"attempt=20to=20open-code=20?= =?UTF-8?q?=E2=80=98anonymous=20lambda=E2=80=99=20with=20too=20few=20argum?= =?UTF-8?q?ents"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix: #8364 Ref: #6867 Amend: c7ca3ea8cce3 --- modules/term/eshell/config.el | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index d06e2ab9e..8228df5d3 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -234,14 +234,11 @@ Return nil if there is none." (let ((str (split-string (esh-help-man-string cmd) "\n"))) (if (equal (concat "No manual entry for " cmd) (car str)) (ignore (puthash cmd 'none esh-help-man-cache)) - (puthash cmd - (-some->> str - (--drop-while (not (string-match-p "^SYNOPSIS$" it))) - (nth 1) - (funcall (lambda (s) - (let ((idx (string-match "[^\s\t]" s))) - (substring s idx))))) - esh-help-man-cache)))))) + (puthash + cmd (when-let* ((str (seq-drop-while (fn! (not (string-match-p "^SYNOPSIS$" %))) str)) + (str (nth 1 str))) + (substring str (string-match-p "[^\s\t]" str))) + esh-help-man-cache)))))) (use-package! eshell-did-you-mean