From fafc582ba85b776f121da2639544afac04c33dc4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C3=ABl=20Cadilhac?= Date: Fri, 29 Dec 2006 21:39:47 +0000 Subject: [PATCH] (fill-comment-paragraph): Document 2006-12-24 change. Suggested by Stefan Monnier. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/fill.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e7efa92a64c..0e6e9431f67 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-12-29 Micha,Ak(Bl Cadilhac + + * textmodes/fill.el (fill-comment-paragraph): Document 2006-12-24 + change. Suggested by Stefan Monnier. + 2006-12-29 Kim F. Storm * emacs-lisp/bindat.el (bindat--unpack-group, bindat--length-group) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index e3250a6f710..21ee585ec11 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -838,14 +838,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 + ;; `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 -- 2.39.2