On Wed, Jun 13, 2012 at 9:45 AM, Chong Yidong <cyd@gnu....> wrote:
> Bois Francois-Xavier <fxbois@gmai...> writes:
>> I've written web-mode.el, a major mode for PHP/HTML templates files.
>> It aims to natively indent and syntaxcolor according to the "context"
> Thanks, this looks interesting. The problem with nXhtml mode (and
> php-mode) is that we've had a hell of a time trying to get the copyright
> assignments to get them incorporated into Emacs, and at this point I've
> given up. So if you have a newly-written mode that provides similar
> functionality, and are willing to make a copyright assignment to the
> FSF, I might be interested in including it in Emacs.
I would be very happy to have the mode included. What would be the
steps to have it in ?
> I took a brief glance through your code. Here are a few comments:
> The name should be something like php-template-mode.el rather than
The mode will perhaps take care of other languages. Adding Ruby/Java
(JSP) to the mode would be quite easy now. So I would prefer to have a
> (defvar web-mode-variable-name-face 'web-mode-variable-name-face
> "Face name to use for variable names.")
> Don't do this. Just define the variable with defface, and use the face
> name (a symbol) directly wherever you need the face. (This is mentioned
> in the Elisp manual node "Faces".)
I will look into this
> The major mode should derive from either prog-mode or text-mode (not
> sure which is better), rather than fundamental mode.
Ok. But I have a question. Is it a convention ? Is it necessary ?
I used to think that deriving form a very simple mode would make my mode faster.