From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Sprague\, Webb \(OFM\)" <Webb.Sprague@ofm.wa.gov>
Cc: 6834@debbugs.gnu.org
Subject: bug#6834: octave-mode block comments need highlighting
Date: Thu, 12 Aug 2010 11:48:32 +0200 [thread overview]
Message-ID: <jwvpqxocgpl.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <AEABC21942B1974B82CB5B3605B8C452CED09C@ofmmxalc712.ofm.wa.lcl> (Webb Sprague's message of "Mon, 9 Aug 2010 10:02:10 -0700")
> 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.")
next prev parent reply other threads:[~2010-08-12 9:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 17:02 bug#6834: octave-mode block comments need highlighting Sprague, Webb (OFM)
2010-08-12 9:48 ` Stefan Monnier [this message]
2010-08-12 14:46 ` Stefan Monnier
2010-08-12 15:44 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvpqxocgpl.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=6834@debbugs.gnu.org \
--cc=Webb.Sprague@ofm.wa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.