From: Eshel Yaron Date: Mon, 12 Dec 2022 18:01:05 +0000 (+0200) Subject: * (sweeprolog-indent-or-forward-hole): simplify X-Git-Tag: V9.1.1-sweep-0.9.6~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6cc8391edd82e37ae70b53511ac57560c096cff7;p=sweep.git * (sweeprolog-indent-or-forward-hole): simplify --- 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)))))