diff options
| author | Stefan Monnier | 2003-07-22 20:40:38 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-07-22 20:40:38 +0000 |
| commit | 50ef8ff26774972fd045cb021ebbb4ff9719df62 (patch) | |
| tree | 758045e651df461cf1758e50ace60453fec0c0cc /lisp/textmodes | |
| parent | a2b56a25678224afc501f2ad06a08c57a0a1fc83 (diff) | |
| download | emacs-50ef8ff26774972fd045cb021ebbb4ff9719df62.tar.gz emacs-50ef8ff26774972fd045cb021ebbb4ff9719df62.zip | |
(fill-comment-paragraph): Construct a regexp
to match the specific mark rather than reusing comment-start-skip.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/fill.el | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 348c73a0ce5..c8e635268eb 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; fill.el --- fill commands for Emacs | 1 | ;;; fill.el --- fill commands for Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,2002 | 3 | ;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,2003 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -785,7 +785,18 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'." | |||
| 785 | 785 | ||
| 786 | ;; Narrow to include only the comment, and then fill the region. | 786 | ;; Narrow to include only the comment, and then fill the region. |
| 787 | (let* ((fill-prefix fill-prefix) | 787 | (let* ((fill-prefix fill-prefix) |
| 788 | (comment-re (concat "[ \t]*\\(?:" comment-start-skip "\\)")) | 788 | (commark |
| 789 | (comment-string-strip (buffer-substring comstart comin) nil t)) | ||
| 790 | (comment-re | ||
| 791 | (if (string-match comment-start-skip (concat commark "a")) | ||
| 792 | (concat "[ \t]*" (regexp-quote commark) | ||
| 793 | ;; Make sure we only match comments that use | ||
| 794 | ;; the exact same comment marker. | ||
| 795 | "[^" (substring commark -1) "]") | ||
| 796 | ;; If the commark needs to be followed by some special | ||
| 797 | ;; set of characters (like @c in TeXinfo), we can't | ||
| 798 | ;; rely just on `commark'. | ||
| 799 | (concat "[ \t]*\\(?:" comment-start-skip "\\)"))) | ||
| 789 | (comment-fill-prefix ; Compute a fill prefix. | 800 | (comment-fill-prefix ; Compute a fill prefix. |
| 790 | (save-excursion | 801 | (save-excursion |
| 791 | (goto-char comstart) | 802 | (goto-char comstart) |