all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Erik Charlebois <erikcharlebois@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: multi-character syntactic entities in syntax tables
Date: Sat, 27 Apr 2013 00:57:04 +0400	[thread overview]
Message-ID: <517AEA20.9070707@yandex.ru> (raw)
In-Reply-To: <CAC+abJa-3DsUn0eY-nwcURFCLT=bnV+wy3A=1CDTpKy3=jZ+pw@mail.gmail.com>

On 26.04.2013 23:22, Erik Charlebois wrote:
> Off the top of my head, point motion (e.g. forward-word should skip the
> entire word, not stop where the syntax class changes from "(" to "w")
> and font locking (show-paren-mode should highlight the entire matching
> words).

But `forward-word' will jump to the end of the next word then, since 
"begin" as a whole would have non-word syntax.

> Since the matching keyword lengths can be different (begin vs end), my
> understanding is I can't just turn them into ((((( and ))) because it
> doesn't balance.

Yes, that's not what my suggestion was.

> Currently I have some hacks for Ruby mode that makes the first
> characters of the block keywords have "(" or ")" syntax class. It works
> fine, aside from point motion and font locking.

I would've put ")" at the end of "end", but otherwise, that is it. I 
didn't expect it to work with current open/close parens syntax classes, 
though: "string quotes", in similar circumstances, doesn't.

The problem with font-lock is important. Maybe we need a syntax class 
that would mark text as symbol (or word) constituent (or delegate to the 
buffer syntax table), and at the same time mark them as parenthesising 
construct.



  reply	other threads:[~2013-04-26 20:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26 17:28 multi-character syntactic entities in syntax tables Erik Charlebois
2013-04-26 18:53 ` Dmitry Gutov
2013-04-26 19:22   ` Erik Charlebois
2013-04-26 20:57     ` Dmitry Gutov [this message]
2013-04-26 19:26 ` Stefan Monnier
2013-04-26 21:37   ` Erik Charlebois
2013-04-27  4:15     ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=517AEA20.9070707@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=erikcharlebois@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.