help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs octave mode: Resetting the comment character(s)?


From: Jordi Gutiérrez Hermoso
Subject: Re: Emacs octave mode: Resetting the comment character(s)?
Date: Sun, 28 Feb 2010 08:29:11 -0600

On 27 February 2010 21:59, forkandwait <address@hidden> wrote:
> Is there a way to set the comment characters in emacs' octave-mode to JUST be
> "#"?  Having "%" is messing me up with autoindent and textread.

It seems like octave-mode doesn't expose an interface to modify this.
But... This. Is. Emacs. We'll customise it whether it wants to or not.
;-)

You could put something like this in your .emacs:

     (eval-after-load 'octave-mode
       (modify-syntax-entry ?\% " " octave-mode-syntax-table) )

That will make octave-mode tread % as if were a whitespace character.
Look at modify-syntax-entry's docstring (C-h f modify-syntax-entry
<RET>) for other possible things you could want octave-mode to do with
%.

I'm not exactly sure what are you doing with % other than comments or
why you want to do this, but there you go.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]