-;;; live-py-mode.el --- Live Coding in Python
+;;; live-py-mode.el --- Live Coding in Python -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2015 Don Kirkby
 

                      nil
                      t)))
  (unless (string-prefix-p live-py-dir buffer-file-name)
    (error "Working directory must be a parent of %s." buffer-file-name))
  (setq live-py-module (file-name-base buffer-file-name))
  (setq live-py-parent (directory-file-name
			(file-name-directory buffer-file-name)))

(defvar live-py-lighter)

(defun live-py-after-change-function (start stop len)
  "After a delay run the buffer through the code tracer and show trace.
START, STOP and LEN are required by `after-change-functions' but unused."
  (ignore start stop len)
  (when live-py-timer (cancel-timer live-py-timer))
  (set 'live-py-timer (run-at-time 0.5 nil 'live-py-trace)))

(defun live-py-trace ()
  "Trace the Python code using code_tracer.py."
  (let* ((tracer-path (locate-file "code_tracer.py" load-path))
         (command-line-start (concat
			      (shell-quote-argument live-py-version)
			      " "
