 
 (defun floobits-filter-func (condp lst)
   (delq nil
-  (mapcar (lambda (x) (and (funcall condp x) x)) lst)))
+        (mapcar (lambda (x) (and (funcall condp x) x)) lst)))
 
 (defun floobits-post-command-func ()
   "used for grabbing changes in point for highlighting"


(defun floobits-event-get_buf (req)
  (floo-when-buf (get-file-buffer (floo-get-item req "full_path"))
    (atomic-change-group
      (delete-region 1 (+ 1 (buffer-size)))
      (insert (floo-get-item req "buf")))))

(defun floobits-event-open_file (req)
  (find-file (floo-get-item req "filename")))

(defun floobits-switch (text)
  (floobits-debug-message "%s" text)
  (let* ((json-key-type 'string)
         (json-false 'nil)
         (req (json-read-from-string text))
         (event (floo-get-item req "name"))
         (func (concat "floobits-event-" event)))
    (if (fboundp (intern-soft func))
        (funcall (read func) req)
      (message "func %s doesn't exist" func))))

(defun floobits-after-change (begin end old_length)
  (when (floobits-buffer-is-shareable (current-buffer))
    ;; not sure why we're doing with-current-buffer here, but it seems important. Originally added in
    ;; https://github.com/Floobits/floobits-emacs/commit/41b6ed9358de6dffa78fa229c347b4b531fc2021
    (with-current-buffer (current-buffer)
      (floobits-send-to-agent
       (list
        (cons 'changed (buffer-substring-no-properties begin end))
        (cons 'begin begin)
        (cons 'end end)
        (cons 'old_length old_length)
        (cons 'full_path (buffer-file-name (current-buffer)))) 'change))))

(defun floobits-after-revert ()
  (when (floobits-buffer-is-shareable (current-buffer))
    ;; not sure why we're doing with-current-buffer here, but it seems important. Originally added in
    ;; https://github.com/Floobits/floobits-emacs/commit/41b6ed9358de6dffa78fa229c347b4b531fc2021
    (floobits-send-to-agent
     (list
      (cons 'buf (floobits-get-buffer-text (current-buffer)))
      (cons 'full_path (buffer-file-name (current-buffer)))) 'revert)))

(defun floobits-after-save-hook ()
  (when (floobits-is-buffer-shared (current-buffer))
