Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f601aaf8
Commit
f601aaf8
authored
Dec 02, 2002
by
Richard M. Stallman
Browse files
(fill-indent-to-left-margin): New function.
(fill-newline, fill-region-as-paragraph): Use that.
parent
15c06436
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
lisp/textmodes/fill.el
lisp/textmodes/fill.el
+9
-3
No files found.
lisp/textmodes/fill.el
View file @
f601aaf8
...
...
@@ -540,13 +540,19 @@ The break position will be always after LINEBEG and generally before point."
'(invisible t)))
(if (or fill-prefix
(not fill-indent-according-to-mode))
(indent-to-left-margin)
(
fill-
indent-to-left-margin)
(indent-according-to-mode))
;; Insert the fill prefix after indentation.
;; Set prefixcol so whitespace in the prefix won't get lost.
(and fill-prefix (not (equal fill-prefix ""))
(insert-and-inherit fill-prefix)))
(defun fill-indent-to-left-margin ()
"
Indent
current
line
to
the
column
given
by
`
current-left-margin
'.
"
(let ((beg (point)))
(indent-line-to (current-left-margin))
(put-text-property beg (point) 'face 'default)))
(defun fill-region-as-paragraph (from to &optional justify
nosqueeze squeeze-after)
"
Fill
the
region
as
one
paragraph.
...
...
@@ -631,7 +637,7 @@ space does not end a sentence, so don't break a line there."
(while (< (point) to)
(if (and (not (eolp))
(< (current-indentation) (current-left-margin)))
(indent-to-left-margin))
(
fill-
indent-to-left-margin))
(forward-line 1)))
(if use-hard-newlines
...
...
@@ -639,7 +645,7 @@ space does not end a sentence, so don't break a line there."
;; Make sure first line is indented (at least) to left margin...
(if (or (memq justify '(right center))
(< (current-indentation) (current-left-margin)))
(indent-to-left-margin))
(
fill-
indent-to-left-margin))
;; Delete the fill-prefix from every line.
(fill-delete-prefix from to fill-prefix)
(setq from (point))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment