X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=emacs%2Fnotmuch-parser.el;h=b8c3fd2c67df90932ec2e66ad0d3c4a8c863937e;hb=fc4cda07a9afbbb545dcc6cd835ca697f6ef2a1b;hp=fbcfc2efb4e6ca624a17198c4b84fc37669e5ec5;hpb=09f6533c3781b61ea634790d4bad38aadf89115c;p=notmuch diff --git a/emacs/notmuch-parser.el b/emacs/notmuch-parser.el index fbcfc2ef..b8c3fd2c 100644 --- a/emacs/notmuch-parser.el +++ b/emacs/notmuch-parser.el @@ -1,4 +1,4 @@ -;;; notmuch-parser.el --- streaming S-expression parser +;;; notmuch-parser.el --- streaming S-expression parser -*- lexical-binding: t -*- ;; ;; Copyright © Austin Clements ;; @@ -39,12 +39,9 @@ The parser always consumes input from point in the current 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)) @@ -171,9 +168,8 @@ additional data. The caller just needs to ensure it does not 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