unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Make Heredocs a first class citizen
@ 2022-01-10 18:56 Reza Nikoopour
  2022-01-10 19:57 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Reza Nikoopour @ 2022-01-10 18:56 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

Hi All,

I’ve been struggling to implement heredoc highlighting. I’ve read various
implementations and they all differ.

It got me thinking that it would be nice is emacs could provide syntax
highlighting for heredocs in the same way it does for multi-line string and
multi line comments as syntactic constructs.

Seeing as multiple languages support heredoc syntax it seems like a good
fit for a core feature.

As I’m struggling to do this myself I don’t feel like I can be the person
to implement this.

Cheers,
Reza

[-- Attachment #2: Type: text/html, Size: 785 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Make Heredocs a first class citizen
  2022-01-10 18:56 Make Heredocs a first class citizen Reza Nikoopour
@ 2022-01-10 19:57 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2022-01-10 19:57 UTC (permalink / raw)
  To: Reza Nikoopour; +Cc: emacs-devel

> It got me thinking that it would be nice is emacs could provide syntax
> highlighting for heredocs in the same way it does for multi-line string and
> multi line comments as syntactic constructs.

In the abstract I agree, but I'm not sure how easy it is and how much
can really be shared.  I think every language has slightly different
rules about how (and where) a heredoc starts, so I suspect it'll be hard
to share that part.  And the "match the end" part is the easy part
anyway, so there's a risk that sharing it may not bring very
much benefit.


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-10 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10 18:56 Make Heredocs a first class citizen Reza Nikoopour
2022-01-10 19:57 ` Stefan Monnier

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).