From 6cc8391edd82e37ae70b53511ac57560c096cff7 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Mon, 12 Dec 2022 20:01:05 +0200 Subject: [PATCH] * (sweeprolog-indent-or-forward-hole): simplify --- sweeprolog.el | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sweeprolog.el b/sweeprolog.el index beeb080..2981dd3 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -4231,15 +4231,8 @@ to the ARGth next hole in the buffer." (interactive "p" sweeprolog-mode) (if (use-region-p) (indent-region (region-beginning) (region-end)) - (let ((point (point)) - (tab-always-indent 'complete) - (completion-at-point-functions nil)) - (unless (save-excursion - (beginning-of-line) - (or (sweeprolog-at-beginning-of-top-term-p) - (looking-at-p "[ \t]*$") - (looking-at-p (rx (or "%" "/*"))))) - (indent-for-tab-command)) + (let ((point (point))) + (sweeprolog-indent-line) (when (= point (point)) (sweeprolog-forward-hole arg))))) -- 2.39.2