[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/fill.el,v
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/fill.el,v |
Date: |
Mon, 06 Nov 2006 16:01:53 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 06/11/06 16:01:53
Index: fill.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/fill.el,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -b -r1.191 -r1.192
--- fill.el 8 Sep 2006 12:02:54 -0000 1.191
+++ fill.el 6 Nov 2006 16:01:53 -0000 1.192
@@ -741,6 +741,12 @@
(looking-at (regexp-quote prefix))))
(goto-char (match-end 0))))
+(defun fill-minibuffer-function (arg)
+ "Fill a paragraph in the minibuffer, ignoring the prompt."
+ (save-restriction
+ (narrow-to-region (minibuffer-prompt-end) (point-max))
+ (fill-paragraph arg)))
+
(defun fill-paragraph (arg)
"Fill paragraph at or after point. Prefix ARG means justify as well.
If `sentence-end-double-space' is non-nil, then period followed by one
@@ -755,8 +761,13 @@
(barf-if-buffer-read-only)
(list (if current-prefix-arg 'full))))
;; First try fill-paragraph-function.
- (or (and fill-paragraph-function
- (let ((function fill-paragraph-function)
+ (or (and (or fill-paragraph-function
+ (and (window-minibuffer-p (selected-window))
+ (= 1 (point-min))))
+ (let ((function (or fill-paragraph-function
+ ;; In the minibuffer, don't count the width
+ ;; of the prompt.
+ 'fill-minibuffer-function))
;; If fill-paragraph-function is set, it probably takes care
;; of comments and stuff. If not, it will have to set
;; fill-paragraph-handle-comment back to t explicitly or
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/textmodes/fill.el,v,
Richard M. Stallman <=