From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6834: octave-mode block comments need highlighting Date: Thu, 12 Aug 2010 11:48:32 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1281608243 5765 80.91.229.12 (12 Aug 2010 10:17:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 Aug 2010 10:17:23 +0000 (UTC) Cc: 6834@debbugs.gnu.org To: "Sprague\, Webb \(OFM\)" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 12 12:17:21 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1OjUqZ-0004mu-Ol for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Aug 2010 12:17:16 +0200 Original-Received: from localhost ([127.0.0.1]:42346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OjUqZ-00046v-3a for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Aug 2010 06:17:15 -0400 Original-Received: from [140.186.70.92] (port=43353 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OjUqJ-00045T-RT for bug-gnu-emacs@gnu.org; Thu, 12 Aug 2010 06:17:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OjUiA-0000Gk-GZ for bug-gnu-emacs@gnu.org; Thu, 12 Aug 2010 06:08:35 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48147) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjUiA-0000Gd-Dv for bug-gnu-emacs@gnu.org; Thu, 12 Aug 2010 06:08:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OjUOH-0003H6-Ti; Thu, 12 Aug 2010 05:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Aug 2010 09:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6834 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6834-submit@debbugs.gnu.org id=B6834.128160646812580 (code B ref 6834); Thu, 12 Aug 2010 09:48:01 +0000 Original-Received: (at 6834) by debbugs.gnu.org; 12 Aug 2010 09:47:48 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjUO3-0003Gr-K1 for submit@debbugs.gnu.org; Thu, 12 Aug 2010 05:47:47 -0400 Original-Received: from impaqm3.telefonica.net ([213.4.138.3]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjUO1-0003Gl-Pe for 6834@debbugs.gnu.org; Thu, 12 Aug 2010 05:47:46 -0400 Original-Received: from IMPmailhost5.adm.correo ([10.20.102.126]) by IMPaqm3.telefonica.net with bizsmtp id tM6L1e00Y2jdgqJ3PMoZpF; Thu, 12 Aug 2010 11:48:33 +0200 Original-Received: from ceviche.home ([88.12.128.176]) by IMPmailhost5.adm.correo with BIZ IMP id tMoY1e00D3oVAVk1lMoYKP; Thu, 12 Aug 2010 11:48:33 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id 4E918660F0; Thu, 12 Aug 2010 11:48:32 +0200 (CEST) In-Reply-To: (Webb Sprague's message of "Mon, 9 Aug 2010 10:02:10 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 12 Aug 2010 05:48:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39441 Archived-At: > In octave mode, block comments (separated by "%{" and "%}") should be > highlighted in the same font as regular line comments. The patch below should morally fix it, but as the comment explains, it won't work until we fix the underlying C code. Stefan === modified file 'lisp/progmodes/octave-mod.el' --- lisp/progmodes/octave-mod.el 2010-05-20 15:12:20 +0000 +++ lisp/progmodes/octave-mod.el 2010-08-12 09:46:20 +0000 @@ -298,8 +295,16 @@ (modify-syntax-entry ?\" "\"" table) (modify-syntax-entry ?. "w" table) (modify-syntax-entry ?_ "w" table) - (modify-syntax-entry ?\% "<" table) - (modify-syntax-entry ?\# "<" table) + ;; FIXME: The < property of # and % makes Emacs ignore any subsequent char + ;; including {, so it never gets to see the multi-line comments. + ;; This is a shortcoming in syntax.c. In Twelf-mode (which also + ;; suffers from this problem) we work around the issue by setting + ;; "% " rather than just "%" as a comment-starter, but it seems + ;; this wouldn't cut it for Octave. + (modify-syntax-entry ?\% "< 13" table) + (modify-syntax-entry ?\# "< 13" table) + (modify-syntax-entry ?\{ "(} 2b" table) + (modify-syntax-entry ?\} "){ 4" table) (modify-syntax-entry ?\n ">" table) table) "Syntax table in use in `octave-mode' buffers.")