    (string-match-p "writeln(\"$Id.*\");" str)
    ))
 
+;; Javascript documentation
+
+;;;
+(defun open-ojs-documentation ()
+  (interactive)
+  (when (fi::lep-open-connection-p)
+    (let ((filename (fi:eval-in-lisp "(main::call-script-doc)")))
+      (when filename
+	(browse-url-of-file filename)))))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; new mode definition
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  (define-key *ojs-mode-map* "\C-c\C-b" 'save-and-compile-ojs-file)
  (define-key *ojs-mode-map* "\C-cs" 'save-compile-and-sync-ojs-file)
  (define-key *ojs-mode-map* "\C-ct" 'trace-ojs-function)

  (define-key *ojs-mode-map* "\C-cl" 'lock-file)
  (define-key *ojs-mode-map* "\C-cu" 'unlock-file)

       t]
      ["Trace/Untrace function..." trace-ojs-function
       t]
      ["OPX2 javascript documentation"  'open-ojs-documentation
       t]
      ))

  ;; custom keymap
