[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /srv/bzr/emacs/trunk r101338:*lisp/emacs-lisp/syntax.el(syntax-ppss)

From: Dmitry Gutov
Subject: Re: /srv/bzr/emacs/trunk r101338:*lisp/emacs-lisp/syntax.el(syntax-ppss): More sanity check to catchtch
Date: Sun, 16 Feb 2014 18:43:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

E Sabof <address@hidden> writes:

>> In other words, the parent mode suddenly has to become multiple-mode
>> aware. So html-mode, for example, wouldn't be suitable anymore.
> html-mode is part of Emacs. Extending it shouldn't be (socially) hard.

Well, suppose Emacs just provides a derived mode for every templating
language we want to support (some deriving from html-mode others not).

> I had in mind something along the lines of (set-region-mode MODE
> BEGINNING END), provided by emacs infrastructure. Does it somehow go
> wrong from there? That's not unlikely, but I can't think of something
> specific.

Until you define what such a function would do, it's hard for things to
go wrong.

But let's just look at things in motion. What would make a major mode
call this function? It would have to know about a set of template
delimiters, right? And somehow translate them into `set-region-mode'

Are BEGINNING and END buffer positions? What happens if the user inserts
some text in the buffer? Will all regions below suddenly become invalid?

Okay, let's make them markers. What happens when the user removes a
region? Or just one delimiter? Or adds a new delimiter, or region?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]