From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: web-mode.el Date: Wed, 13 Jun 2012 15:45:27 +0800 Message-ID: <874nqfslig.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1339573549 11848 80.91.229.3 (13 Jun 2012 07:45:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2012 07:45:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Bois Francois-Xavier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 13 09:45:48 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SeiGx-0004ip-Ni for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2012 09:45:47 +0200 Original-Received: from localhost ([::1]:39782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeiGx-0008Qx-ER for ged-emacs-devel@m.gmane.org; Wed, 13 Jun 2012 03:45:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeiGr-0008Qm-P4 for emacs-devel@gnu.org; Wed, 13 Jun 2012 03:45:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SeiGl-0002JX-Cy for emacs-devel@gnu.org; Wed, 13 Jun 2012 03:45:41 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:59857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeiGl-0002JC-9B for emacs-devel@gnu.org; Wed, 13 Jun 2012 03:45:35 -0400 Original-Received: from [155.69.17.252] (port=55250 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SeiGi-0002yw-Ub; Wed, 13 Jun 2012 03:45:33 -0400 In-Reply-To: (Bois Francois-Xavier's message of "Tue, 12 Jun 2012 00:24:41 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150913 Archived-At: Bois Francois-Xavier 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" > of (point) (which can be in an HTML part or in a PHP/JavaScript/CSS > bloc). 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 took a brief glance through your code. Here are a few comments: The name should be something like php-template-mode.el rather than web-mode.el. (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".) The major mode should derive from either prog-mode or text-mode (not sure which is better), rather than fundamental mode. (defun web-mode-reload () "Reload web-mode." (interactive) (unload-feature 'web-mode) (web-mode)) I'm not sure what this is for, but it's probably not necessary.