emacs-devel
[Top][All Lists]
Advanced

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

Re: nxml-mode: Derive from prog-mode instead of text-mode


From: Dmitry Gutov
Subject: Re: nxml-mode: Derive from prog-mode instead of text-mode
Date: Sun, 14 May 2017 22:58:37 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Thunderbird/53.0

On 14.05.2017 22:28, Philipp Stephani wrote:

prog-mode is more of an implementation detail than an API. See e.g. the discussion in http://cc-mode-help.narkive.com/KcrSl9QI/standalone-cc-mode-doesn-t-run-prog-mode-hook: "The fact that many programming lanuguage modes are derived from prog-mode is an internal implementation detail, not a user level feature, and users taking advantage of such things are liable to get into trouble."

That is Alan's opinion, not gospel.

I think it also represents a false dichotomy: computer languages can't be arbitrarily classified in "programming" and "text"; it's rather a continuum. If HTML is a "programming language", why not reStructuredText or Markdown? All three are markup languages originally intended for documents, with well-defined grammars. If Markdown is also a "programming language", why not plain text files that contain similar ad-hoc markup?

In the end, we have to consider whether an average user would consider a major mode to be "programming mode". Or we might choose some other criterion.

IIRC Stefan mentioned one such criterion: a mode has an indentation function that works significantly differently from indent-relative.



reply via email to

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