Function: dtrt-indent--for-each-indentation

dtrt-indent--for-each-indentation is a natively compiled function defined in dtrt-indent.el.

Signature

(dtrt-indent--for-each-indentation LANGUAGE FUNC USER-DATA)

Documentation

Call a function for each indentation found.

LANGUAGE is used to lookup a syntax table for excluding lines from the process. For each line not excluded, FUNC is called with USER-DATA as its argument and with point on the first non-whitespace character of the line.

Source Code

;; Defined in /nix/store/xl774j723v677bsfsybzln3vi6w0fpm3-emacs-packages-deps/share/emacs/site-lisp/elpa/dtrt-indent-20260709.2011/dtrt-indent.el
(defun dtrt-indent--for-each-indentation (language func user-data)
  "Call a function for each indentation found.
LANGUAGE is used to lookup a syntax table for excluding lines
from the process.  For each line not excluded, FUNC is called
with USER-DATA as its argument and with point on the first
non-whitespace character of the line."
  (save-excursion
    (let ((case-fold-search nil))
      (goto-char (point-min))
      (while (and (re-search-forward "^[ \t]*" nil t)
                  (funcall func user-data)
                  (progn
                    (dtrt-indent--skip-to-end-of-match
                     nil
                     nil
                     (cdr
                      (assoc language
                             dtrt-indent-language-syntax-table))
                     nil)
                    (beginning-of-line)
                    (let ((here (point)))
                      (forward-line)
                      (not (eq here (point))))))))))