          (list "'.*?'" '(0 font-lock-string-face))
         ))
   (setq font-lock-defaults '(mock-mode-font-lock-keywords))
+  (set (make-local-variable 'syntax-propertize-function)
+       (syntax-propertize-rules
+        ("\\(=\\)\\<begin\\_>" (1 "< b"))
+        ("\\_<\\(b\\)egin_comment\\_>" (1 "< b"))
+        ("=\\<en\\(d\\)\\_>" (1 "> b"))
+        ("\\_<end_commen\\(t\\)\\_>" (1 "> b"))
+        ))
   (setq comment-start "#" comment-end "")
   (run-hooks 'mock-mode-hook)
   )

  (setq major-mode 'mock-mode)
  (setq mode-name "mock-view")
  (set-syntax-table (let ((table (make-syntax-table nil)))
                      (modify-syntax-entry ?# "< b" table)
                      (modify-syntax-entry ?\n "> b" table)
                      table))
  (make-local-variable 'font-lock-defaults)
  (setq mock-mode-font-lock-keywords

         (list "\\([^[:space:];|=<',]+\\)=\\([^[:space:];|=',]*\\)"
               '(1 font-lock-variable-name-face)
               '(2 font-lock-constant-face))
         ;; 1tick instruments
         (list "\\<[A-Za-z0-9_]+@[[:alpha:]]+\\_>"
               '(0 font-lock-constant-face))
