From: Dmitry Gutov Date: Sat, 7 Jan 2023 11:16:56 +0000 (+0200) Subject: (treesit-simple-indent-presets): Do that for 'or' as well. X-Git-Tag: emacs-29.0.90~812 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=86a3462e3d286d4d39337ad450987bbba9415f16;p=emacs.git (treesit-simple-indent-presets): Do that for 'or' as well. * lisp/treesit.el (treesit-simple-indent-presets): Do that for 'or' as well. --- diff --git a/lisp/treesit.el b/lisp/treesit.el index 11a78bddcd8..7205e43916d 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1187,9 +1187,12 @@ See `treesit-simple-indent-presets'.") res)))) (cons 'or (lambda (&rest fns) (lambda (node parent bol &rest _) - (seq-find - (lambda (fn) (funcall fn node parent bol)) - fns)))) + (let (res) + (catch 'break + (dolist (fn fns) + (setq res (funcall fn node parent bol)) + (and res (throw 'break t)))) + res)))) (cons 'not (lambda (fn) (lambda (node parent bol &rest _) (not (funcall fn node parent bol)))))