branch: externals/phps-mode
commit dd8d800dd3a2e8588e70638dad733c0fe4737cb5
Author: Christian Johansson <[email protected]>
Commit: Christian Johansson <[email protected]>
Using coloring overlay for comments as well
---
phps-lexer.el | 3 +--
tests/php/class.php | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/phps-lexer.el b/phps-lexer.el
index 4ba9eef..a708d6e 100644
--- a/phps-lexer.el
+++ b/phps-lexer.el
@@ -189,7 +189,6 @@
"Move forward to POSITION."
(setq semantic-lex-end-point position))
-;; TODO Use font-lock-syntactic-face-function instead?
(defun phps-mode/COLOR_SYNTAX (token start end)
"Syntax coloring for TOKEN from START to END."
;; Syntax coloring
@@ -213,7 +212,7 @@
(overlay-put (make-overlay start end) 'font-lock-face
'font-lock-variable-name-face))
((string= token 'T_COMMENT)
- (add-text-properties start end '(font-lock-face font-lock-comment-face)))
+ (overlay-put (make-overlay start end) 'font-lock-face
'font-lock-comment-face))
((string= token 'T_DOC_COMMENT)
(overlay-put (make-overlay start end) 'font-lock-face
'font-lock-comment-delimiter-face))
diff --git a/tests/php/class.php b/tests/php/class.php
index e43c12b..05a5e11 100644
--- a/tests/php/class.php
+++ b/tests/php/class.php
@@ -1,7 +1,7 @@
<?php
/**
* Some comments here
- * @todo was here
+ * @todo was here
*/
class MyClass {