]> git.eshelyaron.com Git - emacs.git/commitdiff
(fill-comment-paragraph): Construct a regexp
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 22 Jul 2003 20:40:38 +0000 (20:40 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 22 Jul 2003 20:40:38 +0000 (20:40 +0000)
to match the specific mark rather than reusing comment-start-skip.

lisp/ChangeLog
lisp/textmodes/fill.el

index ad5fb2f2acaf7ee4fe3a317ade4ae271e1c5da67..0c9da08d7bf2ed79de0375b941dfaabe9237b6a9 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-22  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * textmodes/fill.el (fill-comment-paragraph): Construct a regexp
+       to match the specific mark rather than reusing comment-start-skip.
+
 2003-07-22  Thien-Thi Nguyen  <ttn@gnu.org>
 
        * progmodes/hideshow.el (hs-special-modes-alist):
@@ -29,8 +34,8 @@
 
 2003-07-21  Kenichi Handa  <handa@m17n.org>
 
-       * international/quail.el (quail-translate-key): Update
-       quail-current-str correctly.
+       * international/quail.el (quail-translate-key):
+       Update quail-current-str correctly.
 
 2003-07-21  Andreas Schwab  <schwab@suse.de>
 
@@ -40,7 +45,7 @@
 2003-07-20  Kai Gro\e,A_\e(Bjohann  <kai.grossjohann@gmx.net>
        Version 2.0.36 of Tramp released.
 
-       * net/tramp.el (tramp-default-password-end-of-line): Renamed from
+       * net/tramp.el (tramp-default-password-end-of-line): Rename from
        tramp-password-end-of-line.
        (tramp-password-end-of-line): New method parameter.
        (tramp-get-password-end-of-line): Function to access method
        insert-file-contents.  This fixes finding remote CVS-controlled
        files.  (It would barf on inserting the CVS/Entries file
        literally, because the file-local-copy handler wasn't called.)
-       (tramp-handle-shell-command): Support optional third arg
-       ERROR-BUFFER.
+       (tramp-handle-shell-command): Support optional third arg ERROR-BUFFER.
        (tramp-sh-extra-args): Adapt defcustom type to XEmacs.
        (tramp-initial-commands): New variable.
        (tramp-process-initial-commands): New function, using the variable.
-       (tramp-open-connection-setup-interactive-shell): Call the new
-       function.
+       (tramp-open-connection-setup-interactive-shell): Call the new function.
        (tramp-buffer-name, tramp-debug-buffer-name): Always put the
        method into the buffer name, never use nil.  Reported by Hanak
        David <dhanak@inf.bme.hu>.
@@ -73,8 +76,7 @@
 
 2003-07-19  Markus Rost  <rost@math.ohio-state.edu>
 
-       * textmodes/artist.el (artist-erase-char): Fix default value using
-       ?\s.
+       * textmodes/artist.el (artist-erase-char): Fix default value using ?\s.
 
 2003-07-19  John Paul Wallington  <jpw@gnu.org>
 
index 348c73a0ce53147f6649f90af2575dc2b70e0067..c8e635268eb7aea30a678f33ec94ea2383ee15e1 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fill.el --- fill commands for Emacs
 
-;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,2002
+;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,2003
 ;;               Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -785,7 +785,18 @@ can take care of filling.  JUSTIFY is used as in `fill-paragraph'."
 
       ;; Narrow to include only the comment, and then fill the region.
       (let* ((fill-prefix fill-prefix)
-            (comment-re (concat "[ \t]*\\(?:" comment-start-skip "\\)"))
+            (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.
+                         "[^" (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
                (goto-char comstart)