From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Leo Liu <sdl.web@gmail.com>
Cc: 14332@debbugs.gnu.org
Subject: bug#14332: 24.3; Octave indentation bug
Date: Sun, 05 May 2013 21:04:14 -0400 [thread overview]
Message-ID: <jwvzjw8kjjk.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m1bo8plwc2.fsf@gmail.com> (Leo Liu's message of "Sun, 05 May 2013 15:28:13 +0800")
>> You'll probably need to add some syntax-propertize case.
>> What does "(1 \(2-3))" mean in Octave? Where else can \ appear in
>> Octave code?
> A \ 1 ≡ inv(A) # one over matrix A, with some optimisation
> if A is a scalar, A \ 1 = 1 / A.
> so \ is an operator.
Then your best bet is probably to put in the mode's syntax-table the
syntax corresponding to the most common use of \ (either as an escape
char in strings or as an operator), and then use syntax-propertize to
put the other syntax on the other case (where you can check (nth
3 (syntax-ppss (math-beginning 0))) to see if you're within a string).
Stefan
next prev parent reply other threads:[~2013-05-06 1:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 4:04 bug#14332: 24.3; Octave indentation bug Leo Liu
2013-05-05 5:29 ` Stefan Monnier
2013-05-05 5:35 ` Leo Liu
2013-05-05 7:17 ` Stefan Monnier
2013-05-05 7:28 ` Leo Liu
2013-05-06 1:04 ` Stefan Monnier [this message]
2013-05-06 3:29 ` Leo Liu
2013-05-06 8:26 ` Leo Liu
2013-05-06 14:48 ` Stefan Monnier
2013-05-06 15:57 ` Leo Liu
2013-05-06 21:37 ` Stefan Monnier
2013-05-06 23:58 ` Leo Liu
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvzjw8kjjk.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=14332@debbugs.gnu.org \
--cc=sdl.web@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).