]> git.eshelyaron.com Git - sweep.git/commitdiff
* (sweeprolog-indent-or-forward-hole): simplify
authorEshel Yaron <me@eshelyaron.com>
Mon, 12 Dec 2022 18:01:05 +0000 (20:01 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 12 Dec 2022 18:02:58 +0000 (20:02 +0200)
sweeprolog.el

index beeb080e8d66ef0a3e92135219d6a92cb318c5e3..2981dd3a5ba81cf473dc1aa480b8d80e3a2f998f 100644 (file)
@@ -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)))))