GNU bug report logs -
#6834
octave-mode block comments need highlighting
Previous Next
Full log
View this message in rfc822 format
> 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.")
This bug report was last modified 14 years and 290 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.