From bug-octave-request at bevo dot che dot wisc dot edu Tue Jan 25 12:43:23 2000 Subject: Bug in Octave major-mode for Emacs From: "John W. Eaton" To: Stephen Eglen Cc: Giuseppe Modugno , bug-octave@bevo.che.wisc.edu Date: Tue, 25 Jan 2000 12:43:43 -0600 (CST) On 25-Jan-2000, Stephen Eglen wrote: | > It took me a while to figure out what was causing the bug because you | > didn't say precisely how to reproduce it. My guess is that you see | > this problem when you are typing comments that start with `%', but not | > if they start with `#'. If that is not the case, then please provide | > a precise test case that I can use to reproduce the problem. | > | > I think the following change is appropriate. I don't know why `%' | > would have been defined as punctuation instead of as a comment | > starter, since it is not used in Octave for anything but starting | > comments. | | hi, | | When I recently examined the lisp code, I too wondered why % was | defined as a punctuation character. I'm not 100% sure, but I think it | may break other things if it is defined as punctuation, since % is | used as things other than comments, e.g. %s in printf commands. | | e.g. I recall if you had somethign like: | | printf("%s", str) | | and then with the cursor at the end of the line, hit M-; | (octave-indent-for-comment) it then messed up the indentation on that | line, rather than doing something desired like: | | printf("%s", str) ; You are right. I undid my previous change and added the following comment to the sources: ;; XXX FIXME XXX -- the syntax mode for `%' is punctuation instead of ;; begin-comment because if it is begin-comment, then typing M-; ;; (octave-indent-for-comment) on lines like ;; ;; sprintf ("%d", foobar); ;; ;; causes them to be improperly indented (the `%' is moved over to the ;; comment-column). | I'll check it out later (sorry, bit busy now). Don't worry. It's not critical. Thanks, jwe ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------