diff options
author | Miles Bader <miles@gnu.org> | 2007-10-11 16:14:00 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-10-11 16:14:00 +0000 |
commit | ecb21060d5c1752d41d7a742be565c59b5fcb855 (patch) | |
tree | fadebcd18a69457a1d564f738c3f9bdcf512ab4b /lisp/textmodes/fill.el | |
parent | 42af7493ae7e7a14ee508800c7fa75b65a94c143 (diff) | |
parent | 58ade22bf16a9ec2ff0aee6c59d8db4d1703e94f (diff) | |
download | emacs-ecb21060d5c1752d41d7a742be565c59b5fcb855.tar.gz emacs-ecb21060d5c1752d41d7a742be565c59b5fcb855.tar.bz2 emacs-ecb21060d5c1752d41d7a742be565c59b5fcb855.zip |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 866-879)
- Merge multi-tty branch
- Update from CVS
- Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
Diffstat (limited to 'lisp/textmodes/fill.el')
-rw-r--r-- | lisp/textmodes/fill.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 48bb176e44c..e0f80b1b118 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -1012,6 +1012,18 @@ space does not end a sentence, so don't break a line there." (goto-char end)))) fill-pfx)) +(defun fill-paragraph-or-region (arg) + "Fill the active region or current paragraph. +In Transient Mark mode, when the mark is active, it calls `fill-region' +on the active region. Otherwise, it calls `fill-paragraph'." + (interactive (progn + (barf-if-buffer-read-only) + (list (if current-prefix-arg 'full)))) + (if (and transient-mark-mode mark-active + (not (eq (region-beginning) (region-end)))) + (fill-region (region-beginning) (region-end) arg) + (fill-paragraph arg))) + (defcustom default-justification 'left "*Method of justifying text not otherwise specified. |