diff options
| author | Richard M. Stallman <rms@gnu.org> | 1994-05-28 08:15:16 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1994-05-28 08:15:16 +0000 |
| commit | 32b50df655cbf91c5d089dfdd40a0f269d04f34e (patch) | |
| tree | c4184fbbad5ed40aed111c44126e41783631dec2 /lisp | |
| parent | 5bca93aca7ee14c6c1b30625ca5f891bddab5faf (diff) | |
| download | emacs-32b50df655cbf91c5d089dfdd40a0f269d04f34e.tar.gz | |
(fill-region-as-paragraph): if left-margin is nonzero,
do adaptive-fill processing even for one-line paragraphs.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/textmodes/fill.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 62873f89785..863b1e7c6e3 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -85,11 +85,15 @@ From program, pass args FROM, TO and JUSTIFY-FLAG." (setq fill-prefix (buffer-substring start (point)))) (goto-char (min from to)) (if (eolp) (forward-line 1)) - ;; If paragraph has only one line, don't assume + ;; If paragraph has only one line, don't assume in general ;; that additional lines would have the same starting ;; decoration. Assume no indentation. -;; (re-search-forward adaptive-fill-regexp) -;; (setq fill-prefix (make-string (current-column) ?\ )) + ;; But if left-margin is nonzero, we can assume ordinary + ;; lines do have indentation. + (if (> left-margin 0) + (progn + (re-search-forward adaptive-fill-regexp) + (setq fill-prefix (make-string (current-column) ?\ )))) ))) (save-restriction |
