all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master 6aa04a5: * lisp/json.el (json-end-of-file): New error.
       [not found] ` <E1YJSTB-0008IQ-ER@vcs.savannah.gnu.org>
@ 2015-02-06  1:05   ` Artur Malabarba
  0 siblings, 0 replies; only message in thread
From: Artur Malabarba @ 2015-02-06  1:05 UTC (permalink / raw)
  To: emacs-devel, Era Eriksson, Stefan Monnier; +Cc: emacs-diffs

> +(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...


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-06  1:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150205195209.31856.78267@vcs.savannah.gnu.org>
     [not found] ` <E1YJSTB-0008IQ-ER@vcs.savannah.gnu.org>
2015-02-06  1:05   ` master 6aa04a5: * lisp/json.el (json-end-of-file): New error Artur Malabarba

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.