From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.help Subject: What is this syntax for in php-mode.el Date: Fri, 20 Apr 2007 03:26:11 +0200 Message-ID: <462816B3.7080000@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1177032384 30271 80.91.229.12 (20 Apr 2007 01:26:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Apr 2007 01:26:24 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 20 03:26:15 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Heht8-0001pv-VT for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Apr 2007 03:26:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hehy9-0006jT-0J for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Apr 2007 21:31:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hehxv-0006hu-9H for help-gnu-emacs@gnu.org; Thu, 19 Apr 2007 21:31:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hehxt-0006fP-E2 for help-gnu-emacs@gnu.org; Thu, 19 Apr 2007 21:31:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hehxt-0006ey-7c for help-gnu-emacs@gnu.org; Thu, 19 Apr 2007 21:31:09 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hehss-0006hN-6n for help-gnu-emacs@gnu.org; Thu, 19 Apr 2007 21:25:58 -0400 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:60853 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1Hehsp-0003Mf-53 for help-gnu-emacs@gnu.org; Fri, 20 Apr 2007 03:25:56 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666 X-Antivirus: avast! (VPS 000734-3, 2007-04-19), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1Hehsp-0003Mf-53. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1Hehsp-0003Mf-53 480e642ad95e1dd7726c85b2cbb25c88 X-detected-kernel: Linux 2.6? (barebone, rare!) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42842 Archived-At: I am looking at php-mode.el from Turadg. I can not understand this: (defconst php-font-lock-syntactic-keywords (if xemacsp nil ;; Mark shell-style comments. font-lock handles this in a ;; separate pass from normal syntactic scanning (somehow), so we ;; get a chance to mark these in addition to C and C++ style ;; comments. This only works in GNU Emacs, not XEmacs 21 which ;; seems to ignore this same code if we try to use it. (list ;; Mark _all_ # chars as being comment-start. That will be ;; ignored when inside a quoted string. '("\\(\#\\)" (1 (11 . nil))) ;; Mark all newlines ending a line with # as being comment-end. ;; This causes a problem, premature end-of-comment, when '#' ;; appears inside a multiline C-style comment. Oh well. '("#.*\\([\n]\\)" (1 (12 . nil))) ))) What is it for? Does php use # as a comment somewhere? And what about the format for the list entries? I tried to look at font-lock-syntactic-keywords, but I can not see that these entries follows the spec there. How does this work?