refactor(emacs/lean-server): rename flush-changed-lines to server-flush-changed-lines

This commit is contained in:
Soonho Kong 2014-09-12 09:38:09 -07:00
parent c034c54f50
commit 27ae03878c
2 changed files with 8 additions and 8 deletions

View file

@ -210,7 +210,7 @@
;; How to send data to an async process
;; ====================================
(defun lean-flush-changed-lines ()
(defun lean-server-flush-changed-lines ()
"Flush lean-changed-lines.
Send REPLACE commands to lean-server, reset lean-changed-lines to nil."
@ -244,16 +244,16 @@ If it's not the same with file-name (default: buffer-file-name), send VISIT cmd.
('REPLACE (lean-server-check-current-file))
('INSERT (lean-server-check-current-file))
('REMOVE (lean-server-check-current-file))
('INFO (lean-flush-changed-lines))
('INFO (lean-server-flush-changed-lines))
('CHECK ())
('SET ())
('EVAL (lean-server-check-current-file))
('OPTIONS ())
('SHOW (lean-server-check-current-file))
('VALID (lean-server-check-current-file))
('FINDP (lean-flush-changed-lines)
('FINDP (lean-server-flush-changed-lines)
(lean-server-check-current-file))
('FINDG (lean-flush-changed-lines)
('FINDG (lean-server-flush-changed-lines)
(lean-server-check-current-file))
('WAIT (lean-server-check-current-file))))

View file

@ -136,18 +136,18 @@ pairs, compute changed-lines, inserted-lines, and removed-lines."
do (add-to-list 'lean-changed-lines n)))
(defun lean-after-change-handle-inserted (inserted-lines changed-lines)
(lean-flush-changed-lines)
(lean-server-flush-changed-lines)
(cl-loop for n in inserted-lines
do (lean-server-send-cmd-async (lean-cmd-insert n (lean-grab-line n))))
(setq lean-changed-lines changed-lines)
(lean-flush-changed-lines))
(lean-server-flush-changed-lines))
(defun lean-after-change-handle-removed (removed-lines changed-lines)
(lean-flush-changed-lines)
(lean-server-flush-changed-lines)
(cl-loop for n in removed-lines
do (lean-server-send-cmd-async (lean-cmd-remove n)))
(setq lean-changed-lines changed-lines)
(lean-flush-changed-lines))
(lean-server-flush-changed-lines))
(defun lean-after-change-function (beg end leng-before)
"Function attached to after-change-functions hook"