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: Yuri Khan
Subject: Re: nxml-mode: Derive from prog-mode instead of text-mode
Date: Tue, 16 May 2017 18:17:58 +0700

On Tue, May 16, 2017 at 5:34 PM, Jostein Kjønigsen
<address@hidden> wrote:

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

I have two functions in my current Emacs configuration that run on
'prog-mode-hook.

* One binds 'newline-and-indent to RET and 'newline to C-j. I suppose
it is a leftover from the times before electric-indent-mode. I should
get rid of it.

* Another changes the value of 'whitespace-style. In text modes, I
only visualize spaces, tabs and newlines; in programming modes, I also
mark all kinds of coding style violations such as overly long lines,
mixing tabs and spaces, and using an indentation character that
disagrees with the value of 'indent-tabs-mode specific to major mode.
This probably could be unified, too. The big difference here is modes
that are neither text nor programming — I call them application modes
— such as dired, calendar, or compilation — because they don’t need
even whitespace visualization.


As for your cases, you mention compilation and project management. I
think they are not actually programming-dependent. I bind 'recompile
with a compile-command of "make" (actually a variation on that) to
<f9> globally, and I use it in contexts that I don’t consider
programming — e.g. converting images between formats.



reply via email to

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