fix(emacs/lean-server): respect order of messages in check-buffer-and-partition
This commit is contained in:
parent
7c4debd1d1
commit
b51e8dd1b9
1 changed files with 11 additions and 7 deletions
|
@ -124,12 +124,16 @@
|
|||
|
||||
(defun lean-server-check-buffer-and-partition (buf-str)
|
||||
"Return the status of buffer."
|
||||
(let (result)
|
||||
(when buf-str
|
||||
(let (matches partition-result)
|
||||
(setq matches
|
||||
(cl-loop for (type beg-regex end-regex) in lean-server-syntax-pattern
|
||||
do (setq partition-result (lean-server-split-buffer buf-str beg-regex end-regex))
|
||||
if partition-result
|
||||
return `(,type ,partition-result)))))
|
||||
collect `(,type ,partition-result)))
|
||||
(when matches
|
||||
(-min-by (-on '< (lambda (type-partition-result) (length (car (cdr type-partition-result)))))
|
||||
matches)))))
|
||||
|
||||
(defun lean-server-process-received-message (buf str)
|
||||
"Process received message from lean-server"
|
||||
|
|
Loading…
Reference in a new issue