Function: unjustify-region

unjustify-region is a byte-compiled function defined in fill.el.gz.

Signature

(unjustify-region &optional BEGIN END)

Documentation

Remove justification whitespace from region.

For centered or right-justified regions, this function removes any indentation past the left margin from each line. For full-justified lines, it removes extra spaces between words. It does nothing in other justification modes. Arguments BEGIN and END are optional; default is the whole buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/fill.el.gz
(defun unjustify-region (&optional begin end)
  "Remove justification whitespace from region.
For centered or right-justified regions, this function removes any indentation
past the left margin from each line.  For full-justified lines, it removes
extra spaces between words.  It does nothing in other justification modes.
Arguments BEGIN and END are optional; default is the whole buffer."
  (save-excursion
    (save-restriction
      (if end (narrow-to-region (point-min) end))
      (goto-char (or begin (point-min)))
      (while (not (eobp))
	(unjustify-current-line)
	(forward-line 1)))))