Function: just-src-edit--calculate-indentation

just-src-edit--calculate-indentation is a natively compiled function defined in just-ts-mode.el.

Signature

(just-src-edit--calculate-indentation START END)

Documentation

Calculate the common indentation for task body between START and END.

Source Code

;; Defined in /nix/store/1vmf8s52d6vniw28ckf3szxslimhfphb-emacs-packages-deps/share/emacs/site-lisp/elpa/just-ts-mode-20260319.1513/just-ts-mode.el
(defun just-src-edit--calculate-indentation (start end)
  "Calculate the common indentation for task body between START and END."
  (save-excursion
    (goto-char start)
    (let ((min-indent most-positive-fixnum))
      (while (< (point) end)
        (when (not (looking-at "^\\s-*$"))  ; skip empty lines
          (setq min-indent (min min-indent (current-indentation))))
        (forward-line 1))
      (if (= min-indent most-positive-fixnum) 0 min-indent))))