aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1994-05-28 08:15:16 +0000
committerRichard M. Stallman1994-05-28 08:15:16 +0000
commit32b50df655cbf91c5d089dfdd40a0f269d04f34e (patch)
treec4184fbbad5ed40aed111c44126e41783631dec2 /lisp
parent5bca93aca7ee14c6c1b30625ca5f891bddab5faf (diff)
downloademacs-32b50df655cbf91c5d089dfdd40a0f269d04f34e.tar.gz
emacs-32b50df655cbf91c5d089dfdd40a0f269d04f34e.zip
(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.el10
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."
85 (setq fill-prefix (buffer-substring start (point)))) 85 (setq fill-prefix (buffer-substring start (point))))
86 (goto-char (min from to)) 86 (goto-char (min from to))
87 (if (eolp) (forward-line 1)) 87 (if (eolp) (forward-line 1))
88 ;; If paragraph has only one line, don't assume 88 ;; If paragraph has only one line, don't assume in general
89 ;; that additional lines would have the same starting 89 ;; that additional lines would have the same starting
90 ;; decoration. Assume no indentation. 90 ;; decoration. Assume no indentation.
91;; (re-search-forward adaptive-fill-regexp) 91 ;; But if left-margin is nonzero, we can assume ordinary
92;; (setq fill-prefix (make-string (current-column) ?\ )) 92 ;; lines do have indentation.
93 (if (> left-margin 0)
94 (progn
95 (re-search-forward adaptive-fill-regexp)
96 (setq fill-prefix (make-string (current-column) ?\ ))))
93 ))) 97 )))
94 98
95 (save-restriction 99 (save-restriction