From de334e5c0626492dbe0241d9c5bbc5e0adcef25e Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 1 Nov 2024 16:49:59 +0100 Subject: emacs: Recenter only when called interactively --- .config/emacs/init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 39b0e98..86e1ca1 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -68,7 +68,8 @@ This function is meant to be used in conjuction with `read-string' and (defun mm-do-and-center (function &rest arguments) "Call FUNCTION with ARGUMENTS and then center the screen." (apply function arguments) - (recenter)) + (when (called-interactively-p) + (recenter))) (defmacro mm-comment (&rest _body) "Comment out BODY. A cleaner alternative to line-commenting a region." -- cgit v1.2.3