From aeb16ff0701772e3539b69184a6bb991566abe43 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Thu, 31 Oct 2019 23:51:34 -0500 Subject: [PATCH] Recenter on beautify --- settings.org | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/settings.org b/settings.org index a2fae15..ebd5d73 100644 --- a/settings.org +++ b/settings.org @@ -215,9 +215,10 @@ This handy function is a customized ripoff of custom-save-all (setq meghanada-javac-xlint "-Xlint:all,-processing") (advice-add 'meghanada-code-beautify :around (lambda (old) (interactive) - (let ((p (point))) + (let ((p (line-number-at-pos))) (apply old nil) - (goto-char p)))) + (goto-line p) + (reposition-window)))) (defhydra hydra-meghanada (:hint nil :exit t) " ^Edit^ ^Tast or Task^