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: Jostein Kjønigsen
Subject: Re: nxml-mode: Derive from prog-mode instead of text-mode
Date: Tue, 16 May 2017 12:34:15 +0200

On Mon, May 15, 2017, at 05:05 AM, Tom Tromey wrote:
"Philipp" == Philipp Stephani <address@hidden> writes:

Philipp> prog-mode is more of an implementation detail than an API.

I don't think that's correct.  For example, the emacs manual recommends
it to users:

      In particular, if you want to apply a hook function to any
    programming language mode, add it to ‘prog-mode-hook’; Prog mode is a
    major mode that does little else than to let other major modes
    inherit
    from it, exactly for this purpose.

Tom

Thanks for the feedback everyone.

Much of the response I have received has been arguments for why one should not use prog-mode and how it is wrong to assume prog-mode represents a specific behaviour.

This had me quite surprised. It seems very counter-intuitive, and 100% opposite to how I think it's perceived and used in the community.

Given the amount of "negative" type replies I've gotten, I'm tempted to post a counter-challenge: If this isn't the appropriate use of prog-mode... What would you consider the proper uses of it to be (both as a developer or user)?

Apart from the "it's an implementation detail" (which from what I can tell is not a consensus-opinion), are there any other opinions?

If nobody can think of anything other use-cases... What use it? Like Alan points out: it represents absolutely minimal amount of code-reuse internally with only 3 bindings, so that's clearly not a convincing argument.

So before anything else, I would like to assess if we can have a majority agreement that prog-mode is NOT an implementation detail, but rather an API both users and developers are encouraged to use for programming-related activities and customizations.

If we can agree on that, I think there are options for moving forward.

If not, and we take the "implementation detail" claim at face value, I think it would be a quite interesting exercise to remove prog-mode from Emacs and see just how many packages and configs out there were stopped working, vs how many were built on the same assumption. Anyone want to take bets? :)

--
Regards
Jostein

reply via email to

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