Function: widget--should-indent-p

widget--should-indent-p is a byte-compiled function defined in wid-edit.el.gz.

Signature

(widget--should-indent-p &optional CHECK-AFTER)

Documentation

Non-nil if we should indent at the current position.

With CHECK-AFTER non-nil, considers also the content after point, if needed.

Source Code

;; Defined in /usr/src/emacs/lisp/wid-edit.el.gz
(defun widget--should-indent-p (&optional check-after)
  "Non-nil if we should indent at the current position.
With CHECK-AFTER non-nil, considers also the content after point, if needed."
  (save-restriction
    (widen)
    (and (eq (preceding-char) ?\n)
         (or (not check-after)
             ;; If there is a space character, then we probably already
             ;; indented it.
             (not (eq (following-char) ?\s))))))