       found)))
 
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; highlight "plw" types 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defvar *pjs-plw-types-cache* nil)
+(defvar *pjs-plw-types-cache-regexp* nil)
+
+(defvar *pjs-plw-types-present* t)
+
+;;(defvar *regexp-elements-limit* 1000)
+
+(defun init-pjs-plw-types-cache ()
+  (let* ((functions-list-of-cons (progn (setq *pjs-plc-types-present* (when (fi::lep-open-connection-p) (fi:eval-in-lisp "(if (fboundp 'jvs::pjs-list-plw-types) t nil)")))
+					(when (fi::lep-open-connection-p) (fi:eval-in-lisp "(jvs::pjs-list-plw-types)"))))
+	 (functions-list functions-list-of-cons)
+	 regexp-list)
+    (dolist (sublist (partition-list functions-list *regexp-elements-limit*)) 
+      (push (format "\\(plw\\.\\)?%s" (replace-regexp-in-string "-" "_?" (js--regexp-opt-symbol sublist))) regexp-list))
+    (setq *pjs-plw-types-cache-regexp* regexp-list)
+    (setq *pjs-plw-types-cache* functions-list)))
+
+(defun list-pjs-plw-types-regexps ()  
+  (cond (*pjs-plw-types-cache-regexp*
+	 *pjs-plw-types-cache-regexp*)
+	(*pjs-plw-types-present*
+	 (init-pjs-plw-types-cache)
+	 *pjs-plw-types-cache-regexp*)
+	(t
+	 nil)))
+
+(defun list-pjs-plw-types ()  
+  (cond (*pjs-plw-types-cache*
+	 *pjs-plw-types-cache*)
+	(*pjs-plw-types-present*
+	 (init-pjs-plw-types-cache)
+	 *pjs-plw-types-cache*)
+	(t
+	 nil)))
+
+(defun search-pjs-plw-types (end)
+  (let ((found end)
+	(start (point)))
+    (dolist (regexp (list-pjs-plw-types-regexps))
+      (goto-char start)
+      (setq found (or (re-search-forward regexp (or found end) t)
+		      found)))
+    (if (eq found end)
+	nil
+      found)))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; highlight method / members depending on variable type
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  (push (cons 'search-pjs-plc-types font-lock-type-face) font-locks)

  ;; highlight "standard" types
  (push (cons pjs-font-lock-types font-lock-type-face) font-locks)
  
  ;; hightlight namespace types
  ;; Namespace classes

  ;; class definitions
  (push (list *pjs-class-definition* 1 font-lock-type-face) font-locks)
  
  ;; symbols
  (push (list *pjs-symbols* 0 font-lock-preprocessor-face) font-locks)  
    
