From: michael@cadilhac.name (Michaël Cadilhac)
Cc: emacs-devel@gnu.org
Subject: Re: fortran-fill-paragraph fails
Date: Sun, 24 Dec 2006 01:15:30 +0100 [thread overview]
Message-ID: <87d56acfod.fsf@lrde.org> (raw)
In-Reply-To: <m3r6uq778w.fsf@tfkp07.physik.uni-erlangen.de> (Roland Winkler's message of "Sat\, 23 Dec 2006 20\:16\:31 +0100")
[-- Attachment #1.1.1: Type: text/plain, Size: 447 bytes --]
"Roland Winkler" <Roland.Winkler@physik.uni-erlangen.de> 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 ?)
[-- Attachment #1.1.2: fill.patch --]
[-- Type: text/x-patch, Size: 1579 bytes --]
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 <michael.cadilhac@lrde.org>
+
+ * textmodes/fill.el (fill-comment-paragraph): Prevent the use of
+ an optimized comment regexp if `comment-start-skip' uses a ^.
+
[-- Attachment #1.1.3: Type: text/plain, Size: 403 bytes --]
--
/!\ 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: michael.cadilhac@gmail.com--' - --'
[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next parent reply other threads:[~2006-12-24 0:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m3r6uq778w.fsf@tfkp07.physik.uni-erlangen.de>
2006-12-24 0:15 ` Michaël Cadilhac [this message]
2006-12-24 1:35 ` fortran-fill-paragraph fails Roland Winkler
2006-12-24 20:26 ` Michaël Cadilhac
2006-12-25 23:00 ` Stefan Monnier
2006-12-27 17:12 ` Roland Winkler
2006-12-29 21:06 ` Stefan Monnier
2006-12-29 22:43 ` Michaël Cadilhac
2006-12-30 6:24 ` Richard Stallman
2006-12-30 12:56 ` Michaël Cadilhac
2006-12-31 1:45 ` Richard Stallman
2007-01-02 23:22 ` Stefan Monnier
2007-01-03 21:11 ` Richard Stallman
2007-01-07 20:12 ` Stefan Monnier
2006-12-30 16:04 ` Roland Winkler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d56acfod.fsf@lrde.org \
--to=michael@cadilhac.name \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.