  - lean-global-before-change-text            : text between beg and end
 
 These information will be used by lean-after-changed-function."
-  ;; (message "lean-before-change %d %d" beg end)
   (setq lean-global-before-change-beg beg)
   (setq lean-global-before-change-end end)
   (setq lean-global-before-change-beg-line-number (line-number-at-pos beg))
   (setq lean-global-before-change-end-line-number (line-number-at-pos end))
   (setq lean-global-before-change-text (buffer-substring-no-properties beg end)))
-
-(defun lean-after-change-log (beg end after-beg-line-number after-end-line-number)
-  (message "before-change: beg=%d (%d) end=%d (%d)"
-           beg lean-global-before-change-beg-line-number
-           end lean-global-before-change-end-line-number)
-  (message "before-text:||%s||" lean-global-before-change-text)
-  (message "before-text # of lines = %d" (count-lines beg end))
-  (message "after-change: beg=%d (%d) end=%d (%d) leng-before=%d"
-           beg after-beg-line-number end after-end-line-number leng-before)
-  (message "after-text:||%s||" (buffer-substring-no-properties beg end))
-  (message "after-text # of lines = %d" (count-lines beg end))
-  (message "changed  lines = %s" (prin1-to-string changed-lines))
-  (message "inserted lines = %s" (prin1-to-string inserted-lines))
-  (message "removed lines  = %s" (prin1-to-string removed-lines))
-  (message "===================================="))
 
 (defun lean-after-change-diff-lines (before-beg-line-number
                                      before-end-line-number

           when (funcall when-pred info)
           collect info))

(defun lean-get-current-sym-info ()
  "Return the information of current symbol at point.

The return valus has the form of '([symbol-string] [start-pos])"

  (lean-flush-changed-lines))

(defun lean-after-change-handle-removed (removed-lines changed-lines)
  (lean-flush-changed-lines)
  (cl-loop for n in removed-lines
           do (lean-server-send-cmd (lean-cmd-remove n)))
