(setq fill-nobreak-predicate '(fill-single-char-nobreak-p fill-single-word-nobreak-p)) (setq-default fill-column 54) (setq sentence-end-double-space nil) (setq default-justification 'left) (defun paragraph-end () (save-excursion (forward-paragraph) (point) )) (defun fill-down () (interactive) (fill-region (line-beginning-position) (paragraph-end)) ) (defun unfill-region (beg end) "Unfill the region, joining text paragraphs into a single line. http://emacswiki.org/emacs/unfillregion" (interactive "*r") (let ((fill-column (point-max))) (fill-region beg end) )) (defun fill-buffer () "Fill all paragraphs in the buffer." (interactive) (fill-region (point-min) (point-max)) ) (defun unfill-buffer () "Unfill all paragraphs in the buffer." (interactive) (unfill-region (point-min) (point-max)) ) (provide 'fill-new)