Function: table--measure-max-width

table--measure-max-width is a byte-compiled function defined in table.el.gz.

Signature

(table--measure-max-width &optional UNLIMITED)

Documentation

Return maximum width of current buffer.

Normally the current buffer is expected to be already the cache buffer. The width excludes following spaces at the end of each line. Unless UNLIMITED is non-nil minimum return value is 1.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/table.el.gz
(defun table--measure-max-width (&optional unlimited)
  "Return maximum width of current buffer.
Normally the current buffer is expected to be already the cache
buffer.  The width excludes following spaces at the end of each line.
Unless UNLIMITED is non-nil minimum return value is 1."
  (save-excursion
    (let ((width 0))
      (goto-char (point-min))
      (while
	  (progn
	    ;; do not count the following white spaces
	    (re-search-forward "\\s *$")
	    (goto-char (match-beginning 0))
	    (if (> (current-column) width)
		(setq width (current-column)))
	    (forward-line)
	    (not (eobp))))
      (if unlimited width
	(max 1 width)))))