diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-11-01 16:49:59 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-11-01 16:49:59 +0100 |
commit | de334e5c0626492dbe0241d9c5bbc5e0adcef25e (patch) | |
tree | bc05fd9b2059db68095be879f6f9cca53803184c /.config/emacs | |
parent | f4142ab2cc6e93e0b22f17b2523703ac8062e968 (diff) |
emacs: Recenter only when called interactively
Diffstat (limited to '.config/emacs')
-rw-r--r-- | .config/emacs/init.el | 3 |
1 files changed, 2 insertions, 1 deletions
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." |