unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* What is this syntax for in php-mode.el
@ 2007-04-20  1:26 Lennart Borgman (gmail)
  2007-04-20  7:24 ` Edward O'Connor
  0 siblings, 1 reply; 8+ messages in thread
From: Lennart Borgman (gmail) @ 2007-04-20  1:26 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

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?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-04-20 16:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2283.1177032673.7795.help-gnu-emacs@gnu.org>
2007-04-20 14:56 ` What is this syntax for in php-mode.el Stefan Monnier
2007-04-20 16:16   ` Lennart Borgman (gmail)
2007-04-20 16:39     ` Lennart Borgman (gmail)
2007-04-20  1:26 Lennart Borgman (gmail)
2007-04-20  7:24 ` Edward O'Connor
2007-04-20 12:24   ` Lennart Borgman (gmail)
     [not found]   ` <mailman.2303.1177072165.7795.help-gnu-emacs@gnu.org>
2007-04-20 13:08     ` Robert D. Crawford
2007-04-20 14:17       ` Lennart Borgman (gmail)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).