   (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)
+
   ;; comment / un-comment
   (define-key *ojs-mode-map* "\C-c;" 'comment-region)
   (define-key *ojs-mode-map* "\C-c:" 'uncomment-region)

(defun check-script-path (script-name file-name)
  ;; checks that the path of the current file matches the one in the database
  (when (fi::lep-open-connection-p) (fi:eval-in-lisp (format "(when (fboundp 'jvs::compare-javascript-source-file)(jvs::compare-javascript-source-file \"%s\" \"%s\"))" script-name file-name))))

(defun do-compile-and-sync-ojs-file (type)
  ;; find the script name

;;;; (:require-patch "")
;;;; HISTORY :
;;;; $Log$
;;;; Revision 3.18  2015/06/29 08:15:56  mgautier
;;;; - add functions to lock/unlock dataset from buffer
;;;; - C-cl -> lock
;;;; - C-cu -> unlock
;;;;
;;;; Revision 3.17  2015/06/15 08:44:16  troche
;;;; * new shortcut Ctrl-c+s to synchronize script in the database from
;;;;   emacs
