unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Template-like string escapes in a major mode
Date: Fri, 20 Oct 2023 21:05:39 +0300	[thread overview]
Message-ID: <ac29d8c6-0480-4896-b142-338cf147f1f7@gmail.com> (raw)

Hello. I have a major mode that I've been slowly developing on and off.

One thing that's left to implement for me is template engine-like string 
escapes. For example lets say we have a string "My name is [name]", 
where name should be treated as if it was outside of the string. Note 
that [] brackets can also appear normally like any C-inspired language, 
so they're only special within the "" quotes.

The way I understood is that I can't just rely on the syntax classes 
here and I have to write my own syntax-propertize-function. But this 
also seems like a very typical problem that's been solved in many 
existing major modes, so I somewhat expect someone to have the exact 
syntax-propertize-function I'm looking for already developed and tested. 
Any other pointers would be welcome too.




                 reply	other threads:[~2023-10-20 18:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=ac29d8c6-0480-4896-b142-338cf147f1f7@gmail.com \
    --to=nikolay.kudryavtsev@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).