Function: allout-widgets-adjusting-message

allout-widgets-adjusting-message is a byte-compiled function defined in allout-widgets.el.gz.

Signature

(allout-widgets-adjusting-message MESSAGE)

Documentation

Post MESSAGE when pending are likely to make a big enough delay.

If posting of the MESSAGE is warranted and there already is a current-message in the minibuffer, the MESSAGE is appended to the current one, and the previously pending current-message is returned for later posting on completion.

If posting of the MESSAGE is warranted, but no current-message is pending, then t is returned to indicate that case.

If posting of the MESSAGE is not warranted, then nil is returned.

See allout-widgets-adjust-message-length-threshold, allout-widgets-adjust-message-size-threshold for message posting threshold criteria.

Source Code

;; Defined in /usr/src/emacs/lisp/allout-widgets.el.gz
;;;_   > allout-widgets-changes-exceed-threshold-p ()
(defun allout-widgets-adjusting-message (message)
  "Post MESSAGE when pending are likely to make a big enough delay.

If posting of the MESSAGE is warranted and there already is a
`current-message' in the minibuffer, the MESSAGE is appended to
the current one, and the previously pending `current-message' is
returned for later posting on completion.

If posting of the MESSAGE is warranted, but no `current-message'
is pending, then t is returned to indicate that case.

If posting of the MESSAGE is not warranted, then nil is returned.

See `allout-widgets-adjust-message-length-threshold',
`allout-widgets-adjust-message-size-threshold' for message
posting threshold criteria."
  (if (or (> (length allout-widgets-changes-record)
             allout-widgets-adjust-message-length-threshold)
          ;; for size, use distance from start of first to end of last:
          (let ((min (point-max))
                (max 0)
                first second)
            (mapc (lambda (entry)
                    (if (eq :undone-exposure (car entry))
                        nil
                      (setq first (cadr entry)
                            second (caddr entry))
                      (if (< (min first second) min)
                          (setq min (min first second)))
                      (if (> (max first second) max)
                          (setq max (max first second)))))
                    allout-widgets-changes-record)
            (> (- max min) allout-widgets-adjust-message-size-threshold)))
      (let ((prior (current-message)))
        (message (if prior (concat prior " - " message) message))
        (or prior t))))