* mu4e: remove `ignore-errors' in the mu4e-proc sexp eater

This commit is contained in:
djcb
2012-09-25 07:12:27 +03:00
parent 177cdfe9b9
commit fe82c505d9

View File

@ -49,7 +49,7 @@ the backend.")
a length cookie: a length cookie:
<`mu4e~cookie-pre'><length-in-hex><`mu4e~cookie-post'>.") <`mu4e~cookie-pre'><length-in-hex><`mu4e~cookie-post'>.")
(defconst mu4e~cookie-matcher-rx (defconst mu4e~cookie-matcher-rx
(concat mu4e~cookie-pre "\\([[:xdigit:]]+\\)" mu4e~cookie-post) (purecopy (concat mu4e~cookie-pre "\\([[:xdigit:]]+\\)" mu4e~cookie-post))
"Regular expression matching the length cookie. Match 1 will be "Regular expression matching the length cookie. Match 1 will be
the length (in hex).") the length (in hex).")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -98,7 +98,6 @@ the length (in hex).")
t)) t))
(defsubst mu4e~proc-eat-sexp-from-buf () (defsubst mu4e~proc-eat-sexp-from-buf ()
"'Eat' the next s-expression from `mu4e~proc-buf'. Note: this is a string, "'Eat' the next s-expression from `mu4e~proc-buf'. Note: this is a string,
not an emacs-buffer. `mu4e~proc-buf gets its contents from the not an emacs-buffer. `mu4e~proc-buf gets its contents from the
@ -109,7 +108,6 @@ none. `mu4e~proc-buf' is updated as well, with all processed sexp
data removed." data removed."
;; mu4e~cookie-matcher-rx: ;; mu4e~cookie-matcher-rx:
;; (concat mu4e~cookie-pre "\\([[:xdigit:]]+\\)]" mu4e~cookie-post) ;; (concat mu4e~cookie-pre "\\([[:xdigit:]]+\\)]" mu4e~cookie-post)
(ignore-errors ;; an error would e.g. when proc is killed in the middel
(let ((b (string-match mu4e~cookie-matcher-rx mu4e~proc-buf)) (let ((b (string-match mu4e~cookie-matcher-rx mu4e~proc-buf))
(sexp-len) (objcons)) (sexp-len) (objcons))
(when b (when b
@ -127,7 +125,7 @@ data removed."
'utf-8 t))) 'utf-8 t)))
(when objcons (when objcons
(setq mu4e~proc-buf (substring mu4e~proc-buf sexp-len)) (setq mu4e~proc-buf (substring mu4e~proc-buf sexp-len))
(car objcons))))))) (car objcons))))))
(defsubst mu4e~proc-filter (proc str) (defsubst mu4e~proc-filter (proc str)