# HG changeset patch # User Richard M. Stallman # Date 816024806 0 # Node ID e49cd471ced7fd29558e8101de4d91cfac65ac8a # Parent d01d8c5b6e307defef34fba38db9b0509fb04b42 (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. diff -r d01d8c5b6e30 -r e49cd471ced7 lisp/simple.el --- a/lisp/simple.el Fri Nov 10 17:31:23 1995 +0000 +++ b/lisp/simple.el Fri Nov 10 17:33:26 1995 +0000 @@ -857,7 +857,9 @@ (read-from-minibuffer "Shell command on region: " nil nil nil 'shell-command-history))) - (list (point) (mark) + ;; call-interactively recognizes region-beginning and + ;; region-end specially, leaving them in the history. + (list (region-beginning) (region-end) string current-prefix-arg current-prefix-arg))) @@ -2328,23 +2330,10 @@ ;; Choose a fill-prefix automatically. (if (and adaptive-fill-mode (or (null fill-prefix) (string= fill-prefix ""))) - (let (start end temp) - (save-excursion - (end-of-line) - (setq end (point)) - (beginning-of-line) - (setq start (point)) - (move-to-left-margin) - ;; 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 + (fill-context-prefix + (save-excursion (backward-paragraph 1) (point)) + (point)))) (while (and (not give-up) (> (current-column) fc)) ;; Determine where to split the line.