From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: Font locking #|...|# block in lisp mode? Date: Mon, 25 Oct 2010 15:42:39 -0400 Message-ID: <4CC5DDAF.4060107@gnu.org> References: Reply-To: Emacs Devel NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1288036286 26030 80.91.229.12 (25 Oct 2010 19:51:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Oct 2010 19:51:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 25 21:51:25 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PAT4h-0005tg-7M for ged-emacs-devel@m.gmane.org; Mon, 25 Oct 2010 21:51:19 +0200 Original-Received: from localhost ([127.0.0.1]:38494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAT4g-00081D-Oa for ged-emacs-devel@m.gmane.org; Mon, 25 Oct 2010 15:51:18 -0400 Original-Received: from [140.186.70.92] (port=57147 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PAT4V-0007l8-4H for emacs-devel@gnu.org; Mon, 25 Oct 2010 15:51:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PASwL-00084b-Gu for emacs-devel@gnu.org; Mon, 25 Oct 2010 15:42:42 -0400 Original-Received: from mx1.janestreet.com ([38.105.200.112]:41142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PASwL-00084X-F1 for emacs-devel@gnu.org; Mon, 25 Oct 2010 15:42:41 -0400 Original-Received: from nyc-smtp.janestreet.com ([172.25.22.57] helo=nyc-qsv-mail1.delacy.com) by mx1.janestreet.com with esmtp (Exim 4.71) (envelope-from ) id 1PASwJ-0006MZ-Qk for emacs-devel@gnu.org; Mon, 25 Oct 2010 15:42:39 -0400 Original-Received: from nyc-qws-005.delacy.com ([172.25.131.105]) by nyc-qsv-mail1.delacy.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71) (envelope-from ) id 1PASwJ-0004hz-Oc; Mon, 25 Oct 2010 15:42:39 -0400 User-Agent: Thunderbird 2.0.0.24 (X11/20100721) Original-Newsgroups: gmane.emacs.devel In-Reply-To: X-JS-Compliance: sender=ssteingold recipient=emacs-devel (ld) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:132107 Archived-At: Leo wrote: > Common Lisp can use #| and |# to comment a block however its font > locking is usually wrong in Emacs. I wonder if this can be improved? emacs uses the heuristic that "^(" starts a function. this mean that a paren in column one which does not start a function will mess emacs us. you can add a space before it in comment or backslash in doc string: (defun f () "Doc which contains parens. \(backslash disappears in the reader but saves emacs)" code...) #| add a space before "(defun" to help emacs (defun f ()) #|