From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim.harsman@gmail.com Newsgroups: gmane.emacs.help Subject: Getting fill-paragraph to play nice with javadoc-like comments Date: Sun, 6 Jul 2008 05:05:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: <03e713f0-8f0c-4c78-abe8-21276e59fb2f@f36g2000hsa.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1215360790 5140 80.91.229.12 (6 Jul 2008 16:13:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jul 2008 16:13:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 06 18:13:56 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KFWs5-0000BK-Qn for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Jul 2008 18:13:54 +0200 Original-Received: from localhost ([127.0.0.1]:51156 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KFWrE-000418-OZ for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Jul 2008 12:13:00 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!f36g2000hsa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: 80.216.125.167 Original-X-Trace: posting.google.com 1215345924 17631 127.0.0.1 (6 Jul 2008 12:05:24 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 6 Jul 2008 12:05:24 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f36g2000hsa.googlegroups.com; posting-host=80.216.125.167; posting-account=iSK_UAoAAABCjXNTfP9yOZrMXQ7x1Vzq User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:159919 X-Mailman-Approved-At: Sun, 06 Jul 2008 12:11:04 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55273 Archived-At: I'm writing a major mode for an APL dialect I use at work. I've gotten basic font locking to work, and after setting comment-start and comment-start-skip, comment/uncomment region and fill paragraph also work. However, comment blocks often contain javadoc style comments and i would like fill-paragraph to avoid gluing together lines starting with such commands. If I have this (\ instead of javadoc @): # This is a comment that is long and should be wrapped. # \arg Description of argument # \ret Description of return value M-q gives me: # This is a comment that is long and # should be wrapped. \arg Description # of argument \ret Description of # return value But I want: # This is a comment that is long and # should be wrapped. # \arg Description of argument # \ret Description of return value I've tried setting up paragraph-start and paragraph-separate to appropriate values, but fill-paragraph still doesn't work inside a comment block. If I remove the comment markers, M-q works as I want to, so the regexp I use for paragraph-start seems to work. Any ideas? Do I have to write a custom fill-paragraph for my major mode? cc-mode has one that handles cases like this, but it's really complex, I'd like to avoid it if possible. I also tried setting fill-nobreak-predicate to an appropriate function, but that didn't seem to have any effect at all.