From: Chong Yidong <cyd@stupidchicken.com>
To: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
Cc: Rosen Diankov <rdiankov@cs.cmu.edu>, 703@emacsbugs.donarmstrong.com
Subject: bug#703: Octave comments in emacs
Date: Thu, 21 Aug 2008 11:55:44 -0400 [thread overview]
Message-ID: <87k5eawef3.fsf@cyd.mit.edu> (raw)
Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> > Is there a way to assign two different syntax rules for the same
> > character in emacs? Ie, one where ' is treated as a string quote
> > (and suppresses the syntax elements inside the quotes), and one
> > where it is treated as a suffix operator.
>
> Yes, there is, using the `syntax-table' property. A common way to set
> this property is via the font-lock-syntactic-keywords variable.
>
> So all it takes is a regexp good enough to distinguish the two cases
Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> wrote:
> Octave mode has never provided syntax support for single quoted
> strings because there is no way (short of actually parsing the code)
> of telling these apart from single quotes used for transposition.
Maybe we could use a rough heuristic to handle most of the cases. A '
character that occurs before "[=(] *" is probably the beginning of a
single quoted string, not a transpose operator. WDYT?
next reply other threads:[~2008-08-21 15:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 15:55 Chong Yidong [this message]
2008-08-21 18:26 ` bug#703: Octave comments in emacs Rosen Diankov
-- strict thread matches above, loose matches on Subject: below --
2008-08-13 22:18 Chong Yidong
2008-08-20 16:55 ` Kurt Hornik
2008-08-20 23:21 ` Rosen Diankov
2008-08-20 23:27 ` Rosen Diankov
2008-08-12 2:36 Rosen Diankov
2008-08-12 20:07 ` Rosen Diankov
2008-08-14 20:31 ` bug#703: " Stefan Monnier
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=87k5eawef3.fsf@cyd.mit.edu \
--to=cyd@stupidchicken.com \
--cc=703@emacsbugs.donarmstrong.com \
--cc=Kurt.Hornik@wu-wien.ac.at \
--cc=rdiankov@cs.cmu.edu \
/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).