emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fortran-fill-paragraph fails


From: Michaël Cadilhac
Subject: Re: fortran-fill-paragraph fails
Date: Sun, 24 Dec 2006 01:15:30 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (gnu/linux)

"Roland Winkler" <address@hidden> writes:

> Start a fresh emacs --no-init-file. Load file foo.f (fortran-mode):
> cat foo.f <<EOF
> C     This is a fortran comment
>       CALL FOO
> EOF
>
> On line 1 execute fill-paragraph, which will run
> fortran-fill-paragraph. This gives me
>
> C     This is a fortran comment ALL FOO

Thanks for reporting this bug.

Does the following fix it ? (And is it an acceptable solution ?)

Index: lisp/textmodes/fill.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/fill.el,v
retrieving revision 1.192
diff -c -r1.192 fill.el
*** lisp/textmodes/fill.el      6 Nov 2006 16:01:53 -0000       1.192
--- lisp/textmodes/fill.el      24 Dec 2006 00:12:07 -0000
***************
*** 838,844 ****
             (commark
              (comment-string-strip (buffer-substring comstart comin) nil t))
             (comment-re
!             (if (string-match comment-start-skip (concat commark "a"))
                  (concat "[ \t]*" (regexp-quote commark)
                          ;; Make sure we only match comments that use
                          ;; the exact same comment marker.
--- 838,844 ----
             (commark
              (comment-string-strip (buffer-substring comstart comin) nil t))
             (comment-re
!             (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.
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.10475
diff -C0 -r1.10475 ChangeLog
*** lisp/ChangeLog      23 Dec 2006 19:06:59 -0000      1.10475
--- lisp/ChangeLog      24 Dec 2006 00:13:34 -0000
***************
*** 0 ****
--- 1,5 ----
+ 2006-12-24  Michaël Cadilhac  <address@hidden>
+ 
+       * textmodes/fill.el (fill-comment-paragraph): Prevent the use of
+       an optimized comment regexp if `comment-start-skip' uses a ^.
+ 
-- 
/!\ My mail address has changed, please update your files accordingly.
 |      Michaël `Micha' Cadilhac     |  C'est véritablement un scandale       |
 |         Epita/LRDE Promo 2007     |    et probablement une contrepéterie.  |
 |  http://michael.cadilhac.name     |          -- P. Desproges               |
 `--JID: address@hidden'                                   -  --'

Attachment: pgpPOcD2gr2Ox.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]