Commit 2b03c506 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(do-auto-fill): Use fill-context-prefix.

(shell-command-on-region): Use region-beginning
and region-end, to put them in the command history.

(do-auto-fill): When choosing fill-prefix,
don't include the left-margin indentation.
parent c7e87870
......@@ -857,7 +857,9 @@ In either case, the output is inserted after point (leaving mark after it)."
(read-from-minibuffer "Shell command on region: "
nil nil nil
(list (point) (mark)
;; call-interactively recognizes region-beginning and
;; region-end specially, leaving them in the history.
(list (region-beginning) (region-end)
......@@ -2328,23 +2330,10 @@ Setting this variable automatically makes it local to the current buffer.")
;; Choose a fill-prefix automatically.
(if (and adaptive-fill-mode
(or (null fill-prefix) (string= fill-prefix "")))
(let (start end temp)
(setq end (point))
(setq start (point))
;; Don't do it if this line is a paragraph-starter line
;; because then the next line will probably also become one.
;; In text mode, when the user indents the first line of a
;; paragraph, we don't want all the lines to be indented.
(if (not (looking-at paragraph-start))
(cond ((re-search-forward adaptive-fill-regexp end t)
(setq fill-prefix
(buffer-substring-no-properties start (point))))
((setq temp (funcall adaptive-fill-function))
(setq fill-prefix temp)))))))
(setq fill-prefix
(save-excursion (backward-paragraph 1) (point))
(while (and (not give-up) (> (current-column) fc))
;; Determine where to split the line.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment