 (defun override-c++-mode ()
   (when (equal (downcase (substring buffer-file-name -3 nil)) "ojs")
     (opx2-js-mode)))
+
+(when *use-opx2-js-mode*
+  (add-hook 'c++-mode-hook 'override-c++-mode))
 
 ;; replace for new files
 (defun put-alist (item value alist)

;;;; (:require-patch "")
;;;; HISTORY :
;;;; $Log$
;;;; Revision 3.3  2014/10/31 15:05:57  troche
;;;; * autocompletion for ojs files in emacs (requires sc8567 v3.12)
;;;; ** to use, add (defvar *use-opx2-js-mode* t) to your emacs conf file before loading the common configuration

				      '(backward-char)
				      '(end-of-line)
				      '(1 font-lock-variable-name-face)))))

  ;; custom keymap
  (use-local-map *ojs-mode-map*)
  
)

