diff options
author | Miles Bader <miles@gnu.org> | 2007-01-01 03:21:06 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-01-01 03:21:06 +0000 |
commit | 4c34eeeee5886d14f3e60b77fb563cb549c8896f (patch) | |
tree | af17010f0864173dd6416585f08d686377791412 /lisp/textmodes/fill.el | |
parent | 76acf92ebe73e35528c5966a21328305ba7b5aef (diff) | |
parent | db6292445840e2795f35ebad62a14314fc3c7c21 (diff) | |
download | emacs-4c34eeeee5886d14f3e60b77fb563cb549c8896f.tar.gz emacs-4c34eeeee5886d14f3e60b77fb563cb549c8896f.tar.bz2 emacs-4c34eeeee5886d14f3e60b77fb563cb549c8896f.zip |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 563-582)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 177-185)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-158
Diffstat (limited to 'lisp/textmodes/fill.el')
-rw-r--r-- | lisp/textmodes/fill.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 6aae79a825f..4113a884c4c 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -767,7 +767,7 @@ If `fill-paragraph-function' is nil, return the `fill-prefix' used for filling." (list (if current-prefix-arg 'full)))) ;; First try fill-paragraph-function. (or (and (or fill-paragraph-function - (and (window-minibuffer-p (selected-window)) + (and (minibufferp (current-buffer)) (= 1 (point-min)))) (let ((function (or fill-paragraph-function ;; In the minibuffer, don't count the width @@ -843,14 +843,16 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'." (commark (comment-string-strip (buffer-substring comstart comin) nil t)) (comment-re - (if (string-match comment-start-skip (concat commark "a")) + ;; `commark' is surrounded with arbitrary text (`\0' and `a') + ;; to make sure it can be used as an optimization of + ;; `comment-start-skip' in the middle of a line. For example, + ;; `commark' can't be used with the "@c" in TeXinfo (hence + ;; the `a') or with the "C" at BOL in Fortran (hence the `\0'). + (if (string-match comment-start-skip (concat "\0" commark "a")) (concat "[ \t]*" (regexp-quote commark) ;; Make sure we only match comments that use ;; the exact same comment marker. "[^" (substring commark -1) "]") - ;; If the commark needs to be followed by some special - ;; set of characters (like @c in TeXinfo), we can't - ;; rely just on `commark'. (concat "[ \t]*\\(?:" comment-start-skip "\\)"))) (comment-fill-prefix ; Compute a fill prefix. (save-excursion |