emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 6aa04a5: * lisp/json.el (json-end-of-file): New


From: Artur Malabarba
Subject: Re: [Emacs-diffs] master 6aa04a5: * lisp/json.el (json-end-of-file): New error.
Date: Fri, 6 Feb 2015 01:05:49 +0000

> +(define-error 'json-end-of-file "End of file while parsing JSON"
> +  '(end-of-file json-error))

When this form is evaluated, I get the following error:
     error: "Attempt to modify read-only object", (error)

Looking into `define-error', this happens when it tries to `apply'
`nconc' on the result of the `mapcar', which is this:
    ((end-of-file end-of-file error) (json-error json-error error))


I think it may be a bug in `define-error', where that nconc should be
an append. Otherwise, nconc tries to destructively change the list it
gets from (get parent 'error-conditions), which I'm guessing shouldn't
be changed.
I may just be wrong, though. `git blame' reveal this function has
existed in this form since 2013...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]