From 239ae4c71722decec6348cda7b2dbf83f164a857 Mon Sep 17 00:00:00 2001 From: Andrea Date: Sun, 27 Oct 2024 21:07:55 +0000 Subject: [PATCH] make EvalSexp work in non-lisp buffer Sometimes I want to just evaluate the sexp from an Org Mode buffer (or any buffer really) --- molds/core.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/molds/core.el b/molds/core.el index 9cfa502..219de71 100644 --- a/molds/core.el +++ b/molds/core.el @@ -363,8 +363,7 @@ This is a more focused view than `CodeToTree.'") (me-register-mold :key "EvalSexp" - :given (:fn (or (eq major-mode 'emacs-lisp-mode) - (eq major-mode 'lisp-interaction-mode))) + :given (:fn (thing-at-point 'sexp)) :then (:fn (let* ((orig-point (point)) (tree (progn (unless (or (me-get-region) (list-at-point))