buffer. Hence, the caller is allowed to delete any data before
point and may resynchronize after an error by moving point."
(vector 'notmuch-sexp-parser
- ;; List depth
- 0
- ;; Partial parse position marker
- nil
- ;; Partial parse state
- nil))
+ 0 ; List depth
+ nil ; Partial parse position marker
+ nil)) ; Partial parse state
(defmacro notmuch-sexp--depth (sp) `(aref ,sp 1))
(defmacro notmuch-sexp--partial-pos (sp) `(aref ,sp 2))
;; parse, extend the partial parse to figure out when we
;; have a complete list.
(catch 'return
- (when (null (notmuch-sexp--partial-state sp))
+ (unless (notmuch-sexp--partial-state sp)
(let ((start (point)))
(condition-case nil
(throw 'return (read (current-buffer)))
move point in the input buffer."
;; Set up the initial state
(unless (local-variable-p 'notmuch-sexp--parser)
- (set (make-local-variable 'notmuch-sexp--parser)
- (notmuch-sexp-create-parser))
- (set (make-local-variable 'notmuch-sexp--state) 'begin))
+ (setq-local notmuch-sexp--parser (notmuch-sexp-create-parser))
+ (setq-local notmuch-sexp--state 'begin))
(let (done)
(while (not done)
(cl-case notmuch-sexp--state