From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Vincent_Bela=EFche?= Newsgroups: gmane.emacs.devel Subject: progmodes cc: addition of builtin def-const Date: Mon, 03 Dec 2012 21:01:54 +0100 Message-ID: <80boeaaor1.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1354564963 26189 80.91.229.3 (3 Dec 2012 20:02:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Dec 2012 20:02:43 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 03 21:02:56 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 1TfcE4-00037f-Ji for ged-emacs-devel@m.gmane.org; Mon, 03 Dec 2012 21:02:48 +0100 Original-Received: from localhost ([::1]:60217 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfcDs-00071o-UM for ged-emacs-devel@m.gmane.org; Mon, 03 Dec 2012 15:02:36 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:32885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfcDm-000718-SP for emacs-devel@gnu.org; Mon, 03 Dec 2012 15:02:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfcDl-0002pv-EE for emacs-devel@gnu.org; Mon, 03 Dec 2012 15:02:30 -0500 Original-Received: from smtp07.smtpout.orange.fr ([80.12.242.129]:19379 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfcDl-0002no-5F for emacs-devel@gnu.org; Mon, 03 Dec 2012 15:02:29 -0500 Original-Received: from CHOUNEK ([92.135.113.139]) by mwinf5d66 with ME id X82S1k00M30Wtgk0382SL9; Mon, 03 Dec 2012 21:02:27 +0100 X-Antivirus: avast! (VPS 121202-0, 02/12/2012), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.12.242.129 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:155215 Archived-At: --=-=-= Content-Type: text/plain Hello, DXL has a number of language specific functions which I think would be better to fontify like builtins, similar to what is done in AWK. On the other hand DXL is more typed than AWK, so the 3 level fontification of cc-fonts.el is better to use than do a specific fontification like in AWK mode. In order to achieve this goal of reusing cc-fonts, I propose the addition of a new lang constant c-builtin-kwds. This allows the dxl-mode.el which I am elaborating to plug more readily on EMACS CC progmode. If nobody objects I would commit the change the patch thereof is herein attached. VBR, Vincent. --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: inline; filename=cc-builtin.diff Content-Transfer-Encoding: quoted-printable =3D=3D=3D modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-03 17:23:42 +0000 +++ lisp/ChangeLog 2012-12-03 19:55:20 +0000 @@ -1,3 +1,12 @@ +2012-12-03 Vincent Bela=C3=AFche + + * progmodes/cc-fonts.el (c-basic-matchers-before): Use new lang + constant `c-builtin-kwds' for handling language specific keyword + fontification. + + * progmodes/cc-langs.el (c-builtin-kwds): New lang constant for + handling language specific keyword fontification. + 2012-12-03 Agust=C3=ADn Mart=C3=ADn Domingo =20 * textmodes/ispell.el (ispell-init-process) =3D=3D=3D modified file 'lisp/progmodes/cc-langs.el' --- lisp/progmodes/cc-langs.el 2012-09-13 18:41:21 +0000 +++ lisp/progmodes/cc-langs.el 2012-12-03 17:24:59 +0000 @@ -649,6 +649,15 @@ (prefix "::") (left-assoc "."))) =20 +(c-lang-defconst c-builtin-kwds + "Keywords for builtin keywords constants." + ;; This is for functions that are not part of a library but builtin in t= he + ;; language. AWK mode does not use this constant but could have done + ;; so. Currently this is used only as a hook for languages not yes part = of + ;; cc-xxx progmode, like DXL. + t nil + ) + (c-lang-defconst c-opt-identifier-concat-key ;; Appendable adorned regexp matching the operators that join ;; symbols to fully qualified identifiers, or nil in languages that =3D=3D=3D modified file 'lisp/progmodes/cc-fonts.el' --- lisp/progmodes/cc-fonts.el 2012-01-19 07:21:25 +0000 +++ lisp/progmodes/cc-fonts.el 2012-12-03 17:26:28 +0000 @@ -763,6 +763,12 @@ `((eval . (list ,(concat "\\<\\(" re "\\)\\>") 1 c-constant-face-name)))))) =20 + ;; Fontify builtins keyword constants. + ,@(when (c-lang-const c-builtin-kwds) + (let ((re (c-make-keywords-re nil (c-lang-const c-builtin-kwds)))) + `((eval . (list ,(concat "\\<\\(" re "\\)\\>") + 1 c-preprocessor-face-name))))) + ;; Fontify all keywords except the primitive types. ,(if (c-major-mode-is 'pike-mode) ;; No symbol is a keyword after "->" in Pike. --=-=-=--